Issue with removing a line from an editing data grid

Hello,

Playing with the following demo, Blazor DataGrid Component - InLine Editing | Free UI Components by Radzen we noticed that when in "multiple" mode, adding more than one empty rows, without committing any of the new rows, if you try to delete any of them, it removes all of the new rows. Our expectation was only for the one deleted to be removed and not all the new rows.

Thank you

Hi Amavroudakis,
You can resolve this issue by adding a unique ID field to each inserted row. This should address the problem you're encountering. Hope this helps!

Even with a unique identifier (guid in my case) the behaviour persists. I am more interested in the intended behaviour and if this is considered a bug that requires fixing as it manifests in the demo as well.

Testing more using the demo the issue seems wider.

  1. Make sure the mode is 'multiple'
  2. Add 2 new empty lines to the data grid
  3. Fill in the info in the first one and commit using the green tick button inside the row
  4. Delete the other empty row

The result is that both new rows disappear (the empty you just deleted + the other one you committed earlier)

I experienced the same issue. It's because when you do a delete action the whole datagrid is reloaded. This means that the other new (or editing) items are gone, because they are not yet stored in the database.

It would be better if the datagrid has a DeleteRow method. Then you would be able to remove one single row instead of reloading the whole datagrid (that discards all other active edits).