This is a migrated thread and some comments may be shown as answers.

Unable to clear checks from header checkbox in gridview

0 Answers 31 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Priyam
Top achievements
Rank 1
Priyam asked on 15 Apr 2014, 02:12 PM
I have a gridview which has 1st column as checkboxcolumn. I have a button which clears all checked rows from the grid, below is the code for the same.
foreach (GridViewRowInfo row in gridView.Rows)
{
   row.Cells["bool_helper"].Value = false;      
}
But, if all the rows are selected using the header checkbox cell and then the clear button is clicked, the checks from the rows are removed but not from the header check box. I am also not able to set value for the header cell as below. Please suggest.
this.gridView.MasterView.TableHeaderRow.Cells[0].Value = false;

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Priyam
Top achievements
Rank 1
Share this question
or