>>Hi,
>>
>>I have a gridview with this column defined:
>>
>>
<asp:BoundField DataField="AgentPK" HeaderText="AgentPK" Visible="False" />
>>
>>When looping through the rows in the grid I want to check what value this column has. How do I refer to it?
>>
>>If I define another column like this:
>>
>>
<ItemTemplate>
>> <mm:mmCheckBox ID="chkSelector" runat="server" Text="" />
>></ItemTemplate>
>>
>>Then I can refer to it like this:
>>
>>
CheckBox cb = (CheckBox)(row.FindControl("chkSelector"))
>>
>>Do I need to use an ItemTemplate in order to get the value of my AgentPK field?
>
>See
Re: Iterate GridView Values Thread #
1456635 Message #
1456723Thanks, but I don't want to hard code in the column number i order to get the value. That makes for too fragile code.