How to get Grid to update when underlying data changes #375
-
I want to use a grid to show a data set. This data set can change while the page is being displayed. I want to be able to reflect the changes in the Grid when the data changes. I've already tried: InvokeAsync(() => StateChanged()); when the notification of the data change comes through and it does not update what is displayed in the Grid. Any help appreciated. Cheers, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
@powertec-dan Did you try the |
Beta Was this translation helpful? Give feedback.
-
Ah, my apologies, I did not see that in the documentation. I shall look more carefully in future. Having implemented that, I'm now facing a crash when the collection is updated: The code looks like this:
and the exception thrown is:
Rather than clearing the item list, I could go through and do deltas and update only what has changed. Would that help? |
Beta Was this translation helpful? Give feedback.
-
@powertec-dan Could you please check if there are any duplicate rows? |
Beta Was this translation helpful? Give feedback.
@powertec-dan Did you try the
await grid.RefreshDataAsync();
?