Creating a Select/Deselect all checkbox in a datagrid

  • Thread starter Thread starter VBNovice05
  • Start date Start date
V

VBNovice05

I run a search on my database and get items that fit that search in a
datagrid. There are checkboxes already for each item. I need to
create a select/deselect all checkbox at the top of the column and be
able to select.deselect all items that I have found. I am using C#.Net

Thanks in advance for this
 
something like this.

foreach ( DataGridItem item in DataGrid1.Items )
{
CheckBox _Box = item.FindControl("myCheck");
_Box.Checked = true;
}
 
Back
Top