In some rows of the grid I need the CHECKBOX to be visible and enabled. How do I do that?
I attach an image.
1 Answer, 1 is accepted
answered on 12 Nov 2020, 11:46 AM
I suppose that you are using GridViewCheckBoxColumn in the grid. By default, the checkboxes are always visible. If you want to have checkboxes visible only for specific rows, you should handle the CellFormatting event and manage RadCheckBoxEditorElement's Visibility property:
privatevoidRadGridView1_CellFormatting(object sender, CellFormattingEventArgs e)
GridCheckBoxCellElement cell = e.CellElement as GridCheckBoxCellElement;
if (cell != null)
RadCheckBoxEditorElement editorElement = (cell.Editor as RadCheckBoxEditor).EditorElement as RadCheckBoxEditorElement;
if (e.RowIndex == 0 || e.RowIndex == 1)
editorElement.Visibility = ElementVisibility.Visible;
editorElement.Visibility = ElementVisibility.Hidden;
I hope this helps. Should you have further questions please let me know.
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/.