I just added checkboxes to a gridview programatically as following:
foreach (GridViewRow gvr in GridView1.Rows)
{
TableCell tbCell = new TableCell();
CheckBox cb1 = new CheckBox();
tbCell.Controls.Add(cb1);
gvr.Cells.Add(tbCell);
}
My problem is my header row doesn’t get created. How can I programatically make this?
Check the gap in corner on the link to an image.
Thanks in advance
You can use
HeaderRow.Cells.Addproperty