I am using the Datagrid component at my page and the only actions I have enabled is the Add and the Delete actions.
My problem is that when I try to delete an item from the list then the list is cleared and every item is deleted. I saw your examples and I have set the AllowDeleting parameter as true but the problem still exists.
I am posting below the datagrid implementation from my project to show you the problem.
PSPrathap Senthil Syncfusion Team February 14, 2023 08:27 AM UTC
Thank you for reaching out to
Query:”My problem is that when
I try to delete an item from the list then the list is cleared and every item
After reviewing the provided
sample, it seems that you have used the same name for the primary column
multiple times, which is causing the problem of deleting all items from the
list. To resolve this, we recommend using the primary key column for unique values.
You can do this by setting the IsPrimaryKey property to true for a
particular column whose value is unique. Please refer to the attached
documentation for more information.
Editing feature requires a primary key
column for CRUD operations.
To define the primary key, set IsPrimaryKey to true in
a particular column whose value is unique.