Editing a row in grid is overwriting another row.

Hi, I'm using grid for crud operations. Adding data is working correctly. But when i update a row, the updating data is overwriting last added row. After storing grid to database, if i edit a row, it is editing correctly.


3 Replies

RR Rajapandi Ravi Syncfusion Team July 5, 2022 12:25 PM UTC

Hi Vaishnav,


Greetings from Syncfusion support


Before we start providing solution to your query, we need more information for our clarification. Please share the below details that will be helpful for us to provide better solution.


1)        Share your complete Grid rendering code.


2)        Share the issue scenario in video demonstration format.


3)        Share type of data binding used(local data or remote data).


4)        If remote, please share what adaptor you are using in your application.


5)        Share your syncfusion package version.


Regards,

Rajapandi R



VA Vaishnav July 11, 2022 06:32 AM UTC

Hi, this is the syncfusion demo grid : https://ej2.syncfusion.com/angular/demos/#/bootstrap5/grid/normal-edit.

If you see this demo, we can see that user can add field 'Order Id', but not edit it. In my project, the user should be able to edit all the fields. I can give primary key id as the id field in my project. But, on adding a row, primary key will be null and hence delete and edit operations won't work properly. How can I solve this?



RR Rajapandi Ravi Syncfusion Team July 12, 2022 02:36 PM UTC

Hi Vaishnav,


Thanks for your update


By default, in our Grid, to perform the CRUD actions we need to maintain the unique column values which was set as primarykey column. We cannot edit the records for the primarykey column, to avoid the duplication values. This the default behavior of our Grid.


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


Please share what problem you are facing while performing edit and delete, share your exact requirement and issue scenario in pictorial or video representation.


Regards,

Rajapandi R


Loader.
Up arrow icon