We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Checkbox state in ejs-Grid column is lost on edititng a new row

I'm using the ejs grid in batch mode and applied the following selection settings :

selectionSettings = { type: 'Multiple', mode: 'Cell' , cellSelectionMode: 'Box', persistSelection: true}

My requirements are :

  1. No rows should be selected automatically (Allow only manual selection)
  2. Row selection only by using checkbox click.
  3. State persistence of checkbox(s) during the Edit ,Add ,Delete  operation.

Thank you

3 Replies

PS Pavithra Subramaniyam Syncfusion Team October 7, 2022 10:25 AM UTC

Hi Arun Berlin,


Thanks for contacting Syncfusion support.


Query#1: No rows should be selected automatically (Allow only manual selection) && Query#2: Row selection only by using checkbox click.


To select/deselect the rows through checkboxes we need to set the selectionSettings.mode as “Row”. Also, You can achieve your requirement by setting the “selectionSettings.checkboxOnly” as true.


https://ej2.syncfusion.com/angular/documentation/api/grid/selectionSettings/#checkboxonly


Query#3: State persistence of checkbox(s) during the Edit ,Add ,Delete  operation.


For Batch editing, we can persist the row selection only on the “Edit” action using the “selectionSettings.persistSelection” property. We could not persist the selection on and Delete actions.


Please get back to us if you need further assistance on this.


Regards,

Pavithra S



AB Arun Berlin replied to Pavithra Subramaniyam October 7, 2022 01:21 PM UTC

Thank you for the response.

 I've tried the below 'selection settings', but still it is not working as expected.

selectionSettings = { type: 'Multiple', mode: 'Row' , persistSelection: true, checkboxOnly : true};


  1. The checkboxes gets cleared on addition of new row and then the new row gets checked.
  2. The checkboxes gets cleared on double click 'Edit' event on a different row and only the focused row gets checked.
  3. The checkbox gets checked even with click on a different cell of the row.


PS Pavithra Subramaniyam Syncfusion Team October 10, 2022 06:34 AM UTC

Hi Arun Berlin,


Query#1: The checkboxes gets cleared on addition of new row and then the new row gets checked.


The selection will not be persisted while adding new records and deleting in batch edit mode. The rows selection will be persisted in the edit action as we updated in our previous update.


Query#2: The checkboxes gets cleared on double click 'Edit' event on a different row and only the focused row gets checked && The checkbox gets checked even with click on a different cell of the row


The reported scenario is working fine at our end. The checkbox is getting selected only when clicking the checkbox. Please refer to the below sample link for more information.


https://stackblitz.com/edit/angular-tdkxul?file=main.ts


If you are still facing the issue, please share an issue reproducible sample that will be helpful for us to provide a better solution as early as possible.


Regards,

Pavithra S


Loader.
Live Chat Icon For mobile
Up arrow icon