We are using the GridComponent in "Normal" edit mode, which has N number of rows and every row has a checkbox only in one specific column. We have added a checkbox using <ng-template> to that column and now we would like to limit this grid to have only one checkbox selected at a time based on a flag:
So when there is already a flag set to True to one of the records (when rendering for the first time), that rows' checkbox should be checked and all others checkboxes should be disabled until the checked checkbox is unchecked.
When there is no record which has its flag set to True, then all the checkboxes should be enabled at the render time.
So, when someone checks it disables all other rows checkboxes automatically.
DMDineshnarasimman Muthu Syncfusion Team April 4, 2023 01:56 PM UTC
Query: Disable all checkbox if one is selected
After reviewing your
query, we were able to understand that all the checkboxes selection must be
disabled if one checkbox is checked and enabled if the checkbox is unchecked.
Our suggest is to set a flag in rowDeselect event and in rowSelecting event disabling
the select by setting args.Cancel as true. To assist you, we have included a
code snippet and a sample.