We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Datasource-based Diagram not updated if data changes

Hello,

my diagram uses DataSource which is defined in DataSourceSettings.

The DataSource property refers to ObservableCollection.

My expectation was that if I change the ObservableCollection at runtime the digram updates accordingly.

However this is not the case.

Also I tried to call the method RefreshDataSource(), but this did not have any effect either.

Kindly let me know how I can dynamically update the diagram if using an ObservableCollection as its datasource.

Thank you

Daniel


1 Reply

BR Balavignesh RaviChandran Syncfusion Team April 12, 2023 12:01 PM UTC

We have created and attached a sample for your requirement to change the ObservableCollection at runtime, and the diagram updates accordingly. Please find the sample in the following link.
https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/Samples/CollectionChangeInDataSource/CollectionChangeInDataSource

 

I hope this sample will satisfy your requirements. If you still have problems achieving your requirements, kindly explain them in more detail; this will help us provide a solution.

 



Loader.
Up arrow icon