Hello @bluisanajmr,
our demo https://havit.blazor.eu/components/HxGrid#inline-editing is not correct, the selectedDataItem in HandleSelectedDataItemChanged is not the original row changed, but the new row selected. The whole demo "works" only as the DemoDataService holds the instances of employees in memory and these instances are being changed by the input-components binding.
I will adjust the demo to demonstrate the correct approach mentioned in my previous comment. The approach you chose is also applicable but it does save changes on every single input-component change, not the row as a single change.
Another possibility is to add a "Save" button to the row and make it visible only when the row is being edited. Clicking the Save button will save the data and set the selectedDataItem to null to disable editing.
Hello @bluisanajmr, our demo https://havit.blazor.eu/components/HxGrid#inline-editing is not correct, the
selectedDataItem
inHandleSelectedDataItemChanged
is not the original row changed, but the new row selected. The whole demo "works" only as theDemoDataService
holds the instances of employees in memory and these instances are being changed by the input-components binding.I will adjust the demo to demonstrate the correct approach mentioned in my previous comment. The approach you chose is also applicable but it does save changes on every single input-component change, not the row as a single change.
Another possibility is to add a "Save" button to the row and make it visible only when the row is being edited. Clicking the Save button will save the data and set the
selectedDataItem
to null to disable editing.Originally posted by @hakenr in https://github.com/havit/Havit.Blazor/discussions/757#discussioncomment-8583983