Grid - enable cell for adding but disable cell for editing

I have a column called 'PN' on my Grid in Batch mode. I want the users to have the option to populate that cell when inserting a new row, but they can't modify that cell after creation. How do I change the cell allowEditing param based on the action type: inserting and updating?

1 Reply 1 reply marked as answer

PG Praveenkumar Gajendiran Syncfusion Team June 22, 2020 10:25 AM UTC

Hi Christian DAquino,

Greetings from Syncfusion support.

Based on your query, We suggest you to use cellEdit event of Grid.

In the cellEdit event, you can disable editing for particular column cells in batch mode by using cancel property in CellEditArgs .

Please find the below code example: 
cellEdit: (args:CellEditArgs) => { 
    if (args.type === 'edit') { 
      if (args.columnName === 'ShipCountry') { 
        args.cancel = true; 
      } 
    } 
  }, 

Please check below sample for your reference:  


Let us know if you have any concerns. 

Regards,
Praveenkumar G 


Marked as answer
Loader.
Up arrow icon