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

Strange behavior when editing and deleting a row

Hello, I was working with the grid component, but I noticed that it has a strange behavior when editing a row...

To reproduce the first weird behavior:

1. Edit any field in any row.

2. Add new with random values

(at this moment you can notice that the previously edited row returned to the original values before it was edite, that's wrong )

To reproduce the second weird behavior:

1. Edit any field in any row

2. Delete the row edited.

(As you can see, the edited information is deleted but not the entire row, it is as if there was an overlapping row)

Finally, when a row is edited and then you want to get the dataSource through the instance (press the save button) you get an outdated dataSource, that is, with the data that was created initially and not with the changes that were made when editing .

here the code: ComportamientoExtrañoGridSynfusion - StackBlitz

1 Reply

VB Vinitha Balasubramanian Syncfusion Team February 9, 2023 01:18 PM UTC

Hi Alberto,

Thank you for reaching out to Syncfusion support.

Query : Strange behavior when editing and deleting a row

We noticed from your sample that you have not bound any columns to the Grid. As a result, the Grid will generate columns automatically based on the data source you provided. We understand that you would like to perform CRUD actions.

We wanted to inform you about how editing works in the EJ2 Grid. In our Grid, all CRUD actions are based on the primaryKey field, which must have unique values in the data source. If there are duplicate values in the primaryKey field, the CRUD operations may not work as expected. This is the default behavior of the EJ2 Grid. For more information, please refer to the attached documentation.


API: https://ej2.syncfusion.com/react/documentation/api/grid/column/#isprimarykey


Vinitha Balasubramanian

Live Chat Icon For mobile
Up arrow icon