MultiSelect DataGrid checkboxes always editable #5062
-
Hi, I have a multiselect datagrid with a multiselect column. Even when I set DataGrid.Editable = false & DataGridMultiSelectColumn.Editable = false, the checkboxes are still checkable. How do I make the checkboxes not interactable when the component is not in an edit state, & vice versa? The following example still allows users to check/uncheck the checkboxes:
Thanks, Orion |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
ah, I guess I misunderstood the terminology. so I tried providing specific markup for the MultiSelectTemplate. We use permissions checks for being able to edit items in a data grid, but a custom modal for single record editing. & setting Editable from code seemed to leave the checkboxes uneditable, both in the header & in each row. |
Beta Was this translation helpful? Give feedback.
-
thanks @David-Moreira ! |
Beta Was this translation helpful? Give feedback.
Hello @RealityMasque
It seems there's an issue with the
DataGridMultiSelectColumn
, where even if you have your own custom template, just clicking inside the column triggers the selection for the row internally. I have to take a more thorough look at that, I'll open an issue.As an alternative, you can use a regular column, and introduce
PreventRowClick
to make it so the selection only happens when the edit state flag is set to true.Please find the working code below: