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.
- Share the Syncfusion NuGet version details.
- Share the full grid code.
- If possible provide us an issue reproducing sample or reproduce the issue in the provided sample.
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
- Share us the Syncfusion NuGet version details.
- Kindly share us the complete, and combo box code and the action codes which you are performing on selecting an item in combo box.
- Does the combo box rendered in another component?
- Are you binding list or observable collection to the grid datasource?
- Share us the video demo of the issue.
- Share us the simple issue reproducing sample.
- 5 Replies
- 3 Participants
-
DI Dirk
- Aug 27, 2020 08:29 AM UTC
- Feb 22, 2021 11:45 AM UTC