Re: ASP.NET Data Controls hey H2o,
Since we don't know the name of the control, you simply pull the control out of the specific cell's control collection. For example, if your CheckBoxField was the first column of your GridView, then you'd retrieve the CheckBox reference like so:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
GridViewRow gvr = e.Row;
if (gvr.RowType == DataControlRowType.DataRow)
{
CheckBox chk = gvr.Cells[0].Controls[0] as CheckBox;
}
}
__________________ Venkat knowledge is Power |