Hi
I'm using your Grid control with my own CRUD implementation.
When I delete an item in the Grid's datasource, a display refresh error occurs when virtualization is active.
Then last record in the grid is doubled in display.
This duplication only occurs on the first change, but persists on display.
If I disable virtualization (and use paging or not), the problem does not occur.
The same type of problem occurs with SfComboBox. When virtualization is active, data refresh is not correct. For example when we add an element dynamically to the data displayed in the control, these elements are not displayed.
Hi Frederic,
Thanks for your patience.
Query: Regarding the previously reported problem.
We have checked this further from our end. It is not possible to detect the datasource changes when you have directly remove the record from the datasource list. Also to delete the record in the grid, we suggest you to use the DeleteRecordAsync method which is the proper way to perform the delete operation.
Reference:
If you want to delete the record from datasource directly, could you please check the below Observable Collection documentation? This ObservableCollection(dynamic data collection) provides notifications when items are added, removed, and moved. The implement INotifyCollectionChanged notifies when dynamic changes of add, remove, move and clear the collection.
Reference:
https://blazor.syncfusion.com/documentation/datagrid/data-binding#observable-collection
Please let us know if you have any concerns.
Query: SfCombBox problem
Could you please share the below details which will be helpful to validate and provide a better solution?
Regards,
Rahul
Hi
I just did a test using ObservableCollection and DeleteRecordAsync.
Deleting a record via ObservableCollection and the Remove() method works perfectly. Data is displayed correctly in the grid, even if virtualization is active.
On the other hand, the DeleteRecordAsync() method has no action on the data. Weird!
I will test using ObservableCollection with ComboBox to see if that can solve my problem with this particular control. I'll keep you informed.
Thanks
Regards,
Fred
Hi Frederic,
Thanks for the update.
Query: On the other hand, the DeleteRecordAsync() method has no action on the data. Weird!
If you want to delete the record using in-built editing functionality(DeleteRecordAsync method), then you need to enable the editing functionality in the Grid(Need to define the AllowDeleting property as true in GridEditSettings). Find the below documentation for your reference.
Reference:
https://blazor.syncfusion.com/documentation/datagrid/editing
Query: I will test using ObservableCollection with ComboBox to see if that can solve my problem with this particular control. I'll keep you informed.
Thanks for the update. We will wait to hear from you.
Please let us know if you have any concerns.
Regards,
Rahul