Unable to exit the edit mode on a row in Blazor Grid. How to fix it?

Problem:

Once we are in edit mode on a row, within the Syncfusion Blazor Grid, we are unable to exit edit mode.

Using Edit Toolbar:

I can click edit on a row to enter edit mode but if I try to click update with or without making an edit, I am then unable to exit edit mode. But I can use the cancel button to exit edit mode.

Using Double Click to Edit:

When double-clicking the cell I am able to enter edit mode but clicking outside of the row or attempting to edit another row will not allow me to exit edit mode from the initially double-clicked row.


Solution:

Make sure that you have defined PrimaryKey column in Grid as the default edit / delete / insert actions in Grid will take place based on PrimaryKey column value only. Primary key column can be defined using IsPrimaryKey boolean property of GridColumn and it must be defined to any one of available column whose values is unique.

Refer our UG documentation for your reference

https://blazor.syncfusion.com/documentation/datagrid/editing/



2 Replies

JM James McWhinney December 28, 2022 09:49 PM UTC

Did you manage to solve this?
I am having the same issue.

We are using a custom data adaptor, and the "Insert" and "Update" commands work, but the grid remains in edit mode afterwards..







MS Monisha Saravanan Syncfusion Team December 30, 2022 10:24 AM UTC

Hi James,


Before proceeding further with your requirement kindly share the below details to proceed further.


  1. Share us the entire Grid code snippets.
  2. Share us the code snippets of  Insert/update method.
  3. Kindly ensure whether you have included is primary column in DataGrid for an unique column.
  4. Share us the video demonstration of the issue
  5. If possible share us the issue reproducing sample.


Above requested details will be very helpful in validating the reported query at our end and provide solution as early as possible.



Regards,

Monisha



Loader.
Up arrow icon