To reproduce:
private void RadForm1_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.Add("col1", typeof(bool));
dt.Columns.Add("col2", typeof(bool));
dt.Rows.Add(0, 1);
dt.Rows.Add(0, 1);
dt.Rows.Add(0, 1);
RadGridView1.DataSource = dt;
((Telerik.WinControls.UI.GridViewCheckBoxColumn)RadGridView1.Columns(0)).EnableHeaderCheckBox = true;
((Telerik.WinControls.UI.GridViewCheckBoxColumn)RadGridView1.Columns(1)).EnableHeaderCheckBox = true;
RadGridView1.HeaderCellToggleStateChanged += radGridView1_HeaderCellToggleStateChanged;
}
- Start the application and click in the second row in the first column.
Workaraound:
public class MyGridCheckBoxHeaderCellElement : GridCheckBoxHeaderCellElement
{
public MyGridCheckBoxHeaderCellElement(GridViewDataColumn col, GridRowElement row)
: base(col, row)
{ }
protected override void SetCheckBoxState(ToggleState state)
{
if (this.ColumnInfo.Name != this.GridViewElement.CurrentCell.ColumnInfo.Name)
{
return;
}
base.SetCheckBoxState(state);
}
}