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

GridClientSelectColumn - How do I get checked state of header checkbox?

1 Answer 128 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jason Maronge
Top achievements
Rank 1
Jason Maronge asked on 12 Mar 2009, 07:24 PM
I have a GridClientSelectColumn with the Checkbox in the header that selects the row in the grid.  The question I have is how do I tell if the checkbox in the header is checked.  The problem I am having is that my grid is paged and the SelectedItems collection only contains the current page of items.  I need to know if they header checkbox was selected so I can delete all the records in the grid.

Thanks,

Jason

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Mar 2009, 05:27 AM
Hi Jason,

Try the following code snippet for getting the reference to checkbox in header.

CS:
foreach (GridHeaderItem headerItem in RadGrid1.MasterTableView.GetItems(GridItemType.Header)) 
    CheckBox chk = (CheckBox)headerItem["selectAll"].Controls[0]; // Get the header checkbox 

Thanks,
Shinu.
Tags
Grid
Asked by
Jason Maronge
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or