Hi guys
Thanks for the replies. I managed to add a check box using an approach similar to the one suggested by JSuresh, but involved creating a class extending INamingContainer, ITemplate.
Found this link really helpful:
WEBSWAPP Development Inc.
However, I'm having trouble getting to this control by using GridViewRow's FindControl method. For some reason, it does not locate the control in the row with the ID that has been allocated to the checkbox.
Here is my code:
//--
foreach (GridViewRow gvr in GridView1.Rows)
{
CheckBox chkSelect = (CheckBox)gvr.FindControl("chkUpdate");
if (chkSelect != null && chkSelect.Checked)
{
gvr.Cells[5].Text = ddlChangeStatus.SelectedValue;
DataRow dr = ds.Tables[0].Rows[gvr.DataItemIndex];
dr["Status"] = ddlChangeStatus.SelectedValue;
}
}
//--
It returns a null for that particular control. Any suggestions??
Thanks