Nothing, no ID attached to that cell
The HTML code of that gridview is
<asp:GridView ID="gridSearchResult" runat="server" CellPadding="4"
ForeColor="#333333" GridLines="None" AutoGenerateColumns="false">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True"
ForeColor="White" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<EditRowStyle BackColor="#999999" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True"
ForeColor="#333333" />
<PagerStyle BackColor="#284775" ForeColor="White"
HorizontalAlign="Center" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True"
ForeColor="White" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:TemplateField HeaderText="Enable/Disable User Account">
<ItemTemplate>
<asp:CheckBox ID="checkBox_Disable_User_Account"
runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="User Name,Server
IP / HOST NAME"
DataNavigateUrlFormatString="editUserPwd.aspx?user name={0}&server={1}"
HeaderText="Edit User" Text="Edit" />
<asp:BoundField HeaderText="User Name" DataField="User
Name"/>
<asp:BoundField HeaderText="Server IP / HOST NAME"
DataField="Server IP / HOST NAME" />
</Columns>
</asp:GridView>
I want to get the value of boundfield Server IP, thank you.
"Siva M" <sh******@online.excite.comwrote in message
news:0A**********************************@microsof t.com...
What type of control is it? Label? If so, do the same FindControl() method
passing the ID of the label.
"LamSoft" wrote:
>If there is a table(2x2) generated from the gridview as below
checkbox-1 mytest-1 mytest-2
checkbox-1 mytest-3 mytest-3
I know how to check that two checkbox are checked or not, but how to get
the
value of other column at the same row while in the for-loop statement.
for (int i = 0; i < gridSearchResult.Rows.Count; i++)
{
CheckBox cb =
(CheckBox)gridSearchResult.Rows[i].FindControl("checkBox_-1");
if (cb.Checked)
{
// get the value of the row in second column
// how to get it?
}
}
Thanks