Depends on where you wanna find, either in
RowCommand
or
RowDataBound
or anywhere else. In
RowCommand
and
RowDataBound
you can try casting e.Item as your
DataRow
. If you want to get it in other event try looping through it and use
FindControl
function to find your checkbox with the id.
Try this:
foreach(var item in GridView1.Items)
{
CheckBox chk=(CheckBox)item.FindControl("CheckBox1");
}
In the gridview events try using
e.Item.FindControl("CheckBox1")
but make sure that
e.Item
is your gridview
DataItem
.
--Amit