How can I hook the batch edit mode state?

The idea is to show a confirmation dialog before user leave the page while he is in batch edition mode in a grid.

However, I didn't find the event I can hook to show this dialog.

Can someone help me how can I tell the viewModel that user is in batch edit mode when url changes?

```
candeActivate() {
     if(inBatchEditMode){
          dialog.show()
     }
}
```

1 Reply 1 reply marked as answer

SM Shalini Maragathavel Syncfusion Team October 22, 2020 12:18 PM UTC

Hi Ran,  

Greeting from Syncfusion support. 

Based on your requirement you need to display the confirmation dialog when leave the page with edit state in the batch mode. By default in EJ2 Grid the Batch confirmation dialog will be displayed when we move to the next page without updating the edited cell value.

Please refer the below screenshot for more information,




Please refer the below sample for more information.

Sample: https://stackblitz.com/edit/d2bn91-ok3dp9?file=index.js

If we misunderstood your query or this is not your exact requirement, please explain more about your requirement. 

Regards, 
Shalini M. 


Marked as answer
Loader.
Up arrow icon