DataSource not refreshing correctly when virtualization is enabled

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.









5 Replies

RN Rahul Narayanasamy Syncfusion Team March 25, 2022 02:48 PM UTC

Hi Frederic, 

Greetings from Syncfusion. 

We have considered your query as a bug and logged the defect report “DataSource not refreshing correctly in the Grid when virtualization is enabled” for the same. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle) and will include the fix in our upcoming patch release which is expected to be rolled out on or before end of April, 2022. Until then we appreciate your patience.  
  
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.   


Regards 
Rahul 



FF Frederic FOURGEOT March 25, 2022 06:10 PM UTC

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.



RN Rahul Narayanasamy Syncfusion Team May 5, 2022 04:10 AM UTC

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:

https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.SfGrid-1.html#Syncfusion_Blazor_Grids_SfGrid_1_DeleteRecordAsync


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?


  • Full code snippets of the combo box.
  • Details about how you are deleting/adding an element.
  • Video demonstration of the problem.
  • Share a simple reproducible sample if possible.


Regards,

Rahul



FF Frederic FOURGEOT May 5, 2022 08:04 AM UTC

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






RN Rahul Narayanasamy Syncfusion Team May 6, 2022 02:40 PM UTC

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

https://blazor.syncfusion.com/documentation/datagrid/editing#performing-crud-operations-programmatically


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


Loader.
Up arrow icon