Hi,
I'm trying to set the checkbox.checked for the checkbox in the header of the GridClientSelectColumn when AllowMultiRowSelection="true".
I'm using the following code:
The problem I'm having is that even before line 5 runs, the chkSelectAll.Checked is correctly set. No matter what I set it to though the checkbox always clears when the ajax call (in which the above code runs) is ALWAYS set to false.
How can I keep the checkbox checked even when it is set to checked?
I'm trying to set the checkbox.checked for the checkbox in the header of the GridClientSelectColumn when AllowMultiRowSelection="true".
I'm using the following code:
| foreach (GridHeaderItem HeaderItem in costCentresGrid.MasterTableView.GetItems(GridItemType.Header)) | |
| { | |
| //Find the SelectAll CheckBox in the header using the ClientSelectColumn's "UniqueName" | |
| CheckBox chkSelectAll = (CheckBox)HeaderItem["CostCentreSelectColumn"].Controls[0]; | |
| chkSelectAll.Checked = costCentresGrid.MasterTableView.Items.Count == costCentresGrid.SelectedItems.Count; | |
| } |
The problem I'm having is that even before line 5 runs, the chkSelectAll.Checked is correctly set. No matter what I set it to though the checkbox always clears when the ajax call (in which the above code runs) is ALWAYS set to false.
How can I keep the checkbox checked even when it is set to checked?