To reproduce:
- Add checkbox column to a grid and enable filtering.
- Filter on other column so there are no rows visible.
- The header cell checkbox is checked automatically.
Workaround:
void radGridView_CreateCell(object sender, GridViewCreateCellEventArgs e)
{
if (e.CellType == typeof(GridCheckBoxHeaderCellElement))
{
e.CellElement = new GridCheckBoxHeaderCellElement(e.Column,e.Row);
((GridCheckBoxHeaderCellElement)e.CellElement).CheckBox.ToggleStateChanging += CheckBox_ToggleStateChanging;
}
}
void CheckBox_ToggleStateChanging(object sender, StateChangingEventArgs args)
{
if (radDevices.ChildRows.Count == 0)
{
args.Cancel = true;
}
}