Mark Rae said:
Yes, that is why I am confused. The only difference is that the one I am
currently having trouble with is in a Master Page and is in a TemplateField
with a table. See full GridView below.
<asp:GridView ID="gvTasks" runat="server"
AutoGenerateColumns="False"
BackColor="White" BorderColor="#999999" BorderStyle="Solid"
BorderWidth="1px"
CellPadding="3" DataKeyNames="TaskID"
DataSourceID="SqlTasks" ForeColor="Black"
GridLines="Vertical" EmptyDataText="No Current Tasks"
AllowPaging="True"
PageSize="7" Width="100%">
<EmptyDataRowStyle BackColor="Blue" ForeColor="White"
Width="150px" HorizontalAlign="Center" />
<Columns>
<asp:BoundField DataField="TaskID" HeaderText="TaskID"
ReadOnly="True"
SortExpression="TaskID" Visible="False" />
<asp:TemplateField HeaderText="My To Do"
SortExpression="ToDo">
<EditItemTemplate>
</EditItemTemplate>
<ItemTemplate>
<table>
<tr>
<td colspan="3">
<asp:LinkButton ID="LBtnToDo"
runat="server" Text='<%# Bind("ToDo") %>' OnClientClick="opentasks(0);return
false;"></asp:LinkButton>
<asp:TextBox ID="txtPersonID"
runat="server" Text='<%# Bind("PersonID") %>' CssClass="Hide"></asp:TextBox>
</td>
</tr>
<tr>
<td>By:</td>
<td><asp:Label ID="LblToDoDate"
runat="server" Text='<%# Bind("ToDoDate", "{0:M/d/yy}")
%>'></asp:Label></td>
<td><asp:Label ID="LblToDoTime"
runat="server" Text='<%# Bind("ToDoTime", "{0:hh:mm tt}") %>'
HtmlEncode="false"></asp:Label></td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#CCCCCC" />
<PagerStyle BackColor="#999999" ForeColor="Black"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True"
ForeColor="White" />
<HeaderStyle BackColor="Black" Font-Bold="True"
ForeColor="White"
Font-Size="Medium" />
<AlternatingRowStyle BackColor="#CCCCCC" />
</asp:GridView>