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

How to use CellEditArgs event in Angular Grid

Kindly give a example of CellEditAgrs

1 Reply

RS Rajapandiyan Settu Syncfusion Team April 24, 2020 05:23 AM

Hi Namita, 
  
Greetings from syncfusion support. 
  
Query : Kindly give a example of CellEditAgrs 
 
In EJ2 Grid, cellEdit is achieved by set the mode as Batch in the grid editSettings. By default double clicking the cell moves the clicked cell into edited state. Before that it triggers cellEdit event in which you can get the clicked cell element, cell value, filed name, row data, clicked row element, column modal, foreignKey details and primayKey as arguments. Please refer the below screenshot. 
 
 
 
The cancel API is used to decides the editing operation. If it is true, it prevents the editing in grid.  
 
Now the cell is moved in edited state after the cellEdit event, clicking overlay of the form or enter button saves the cell in batch mode. You can get all the batchChanges records by the method getBatchChanges(). 
 
Clicking update button saves the batchChanged records in grid. Before that it triggers beforeBatchSave (triggered before save action occurs) and actionComplete with requestType as batchSave (triggered after save action occurred). 
 
Please refer the below sample and documentation for more information.  
 
 
 
 
Please get back to us if you need further assistance on this. 
 
Regards, 
Rajapandiyan S

Loader.
Live Chat Icon For mobile
Up arrow icon