To reproduce:
1. Bind a RadGridView to the Northwind.Products table
2. Enable the header checkbox for the Discontinued column
3. Set the ReadOnly property either for the grid or for the specific column.
The header checkbox is not allowed to be toggled. However, you can toggle/untoggle it which affects all the data rows.
Hi,
The possible solution that I can suggest in order to disable toggling the header checkbox is to set the GridViewCheckBoxColumn.ShouldCheckDataRows property to false and handle the ViewCellFormatting event where you can disable mouse handling of the checkbox:
private void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
GridCheckBoxHeaderCellElement cell = e.CellElement as GridCheckBoxHeaderCellElement;
if (cell != null)
{
cell.CheckBox.ShouldHandleMouseInput = false;
}
}
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.