DataGrid not refreshing on ObservableCollection CollectionChanged Reset action

If an ObservableCollection is bound as DataSource to an DataGrid and fires the CollectionChanged Reset action the Grid doesn’t refresh.


5 Replies

JP Jeevakanth Palaniappan Syncfusion Team August 28, 2020 10:49 AM UTC

Hi Dirk, 

Greetings from Syncfusion support. 

We have validated your query but unfortunately we are unable to reproduce the reported problem. We have checked the issue by changing the grid datasource in a button click but here the grid refreshes automatically. We have attached the validated sample for your reference. 


If you are still facing the issue, please share the below details, 

  1. Share the Syncfusion NuGet version details.
  2. Share the full grid code.
  3. If possible provide us an issue reproducing sample or reproduce the issue in the provided sample.

The requested details will be helpful for us to validate the issue and provide you a solution as early as possible. 

Regards, 
Jeevakanth SP. 



DI Dirk August 29, 2020 11:20 AM UTC

Hi Jeevakanth,

we are currently using the Syncfusion NuGet version 18.2.0.55. It does not work correctly under certain circumstances. In this context, we were able to reproduce two cases in the demo app (attached zip file).

1) Data in the grid are no longer displayed as soon as you leave the page and call it up again

               protected override async Task OnAfterRenderAsync(bool firstRender)

               {

                             if (firstRender)

                             {

                                            await Task.Delay(250);

                                            await Task.Run(() =>

                                            {

                                                           Model.GridData.Clear();

                              Model.GridData.AddRange(OrdersDetailsObserveData.GetRecords());

                                            });

                             }

               }

Start application -> navigate to the Dropdown page -> navigate back to the grid page => grid remains empty

In more complex navigation scenarios in my application, this happens the first time the page is called up.


2) Data in the grid are not updated when the button in the context menu is clicked (Button on the page works properly)                


Start application -> click on the button at the top right "Change Grid DataSource (not working)" => Grid is not updated

I did not have such problems with Telerik's DataGrid Blazor component.


Attachment: F1573292121209136_ffebf542.zip


JP Jeevakanth Palaniappan Syncfusion Team September 8, 2020 01:47 PM UTC

Hi Dirk, 

Sorry for the delay in getting back to you. 

We have validated the reported issue and confirmed it as a bug and logged the defect report “Grid not refreshed when Observable collection is changed from another component” for the same. Fix for the issue will be included in our weekly patch release expected to be rolled out by month end of September 2020.  

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.     


Until then we appreciate your patience. 

Regards, 
Jeevakanth SP. 



AN anthony February 19, 2021 02:04 PM UTC

I am having this issue. 

I have a Combobox selection event (Employee) that triggers a datagrid update with the time entries for that employee. 

On first selection nothing happens. On second selection it shows the records from the previous employee and stays this way for every selected employee after that.





JP Jeevakanth Palaniappan Syncfusion Team February 22, 2021 11:45 AM UTC

Hi Anthony, 

Greetings from Syncfusion support. 

We have checked your query but we are quite unclear about the issue you are facing. So kindly share us the below details to proceed further. 

  1. Share us the Syncfusion NuGet version details.
  2. Kindly share us the complete, and combo box code and the action codes which you are performing on selecting an item in combo box.
  3. Does the combo box rendered in another component?
  4. Are you binding list or observable collection to the grid datasource?
  5. Share us the video demo of the issue.
  6. Share us the simple issue reproducing sample.

The above details will be helpful for us to validate the issue and provide you with a better solution as early as possible. 

Regards, 
Jeevakanth SP. 


Loader.
Up arrow icon