Posted 29 February 2024, 12:07 am EST
Hi Rambabu,
As per my understanding, you want to select the row using a checkbox that is placed in the rowHeader cells of the FlexGrid. If this is the requirement, then it is recommended to use the Selector class instead of creating custom checkboxes. However, if there is some complex use case for which you are creating checkbox using itemFormatter, then please let me know so that I can assist you as per your use case.
Also, to select the row using Ctrl+Click please set the selectionMode to ‘ListBox’. To display the updated state of the selector, please call the refresh() method of FlexGrid in the handler of selectionChanged event.
Please refer to this code snippet for reference:
let selector = new Selector(theGrid);
theGrid.selectionMode = wjGrid.SelectionMode.ListBox;
theGrid.selectionChanged.addHandler((sender) => {
sender.refresh();
});
Please refer to this sample for reference: Sample.zip
In case if you have any further queries then please let me know.
Thank you.
Regards