Workaround: create a custom GridCheckBoxHeaderCellElement and override the Attach method
public class MyGridCheckBoxHeaderCellElement : GridCheckBoxHeaderCellElement
{
public MyGridCheckBoxHeaderCellElement(GridViewColumn column, GridRowElement row) : base(column, row)
{
}
protected override Type ThemeEffectiveType {
get { return typeof(GridHeaderCellElement); }
}
public override void Attach(GridViewColumn data, object context)
{
if (((GridViewCheckBoxColumn)data).EnableHeaderCheckBox) {
base.Attach(data, context);
} else {
this.CheckBox.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
}
}
}
public Form1()
{
InitializeComponent();
this.radGridView1.CreateCell += radGridView1_CreateCell;
}
private void radGridView1_CreateCell(object sender, Telerik.WinControls.UI.GridViewCreateCellEventArgs e)
{
if (e.CellType == typeof(GridCheckBoxHeaderCellElement)) {
e.CellElement = new MyGridCheckBoxHeaderCellElement(e.Column, e.Row)
}
}