Treegrid - How to reload data from different URLs

Hi all,

I am looking for a way to use an event to change the data source of a Treegrid. Currently I am using load() to load a JSON object from a URL. This URL contains a parameter that can be changed dynamically via a form. As soon as this value is changed, the Treegrid should be reloaded with the new data. A new call of load() shows no effect.

The only way I have found so far is to destruct the Treegrid object and create a new object.

In the forum I found the function .updateFromXML() for an old version of the suite (<7). Is there a JSON pendand for the suite 7.x?

Best regards
Robin

Edit:
If you are using the ‘groupBy’ method, loading of different ‘sources’ is not working via the load() function. If you use ‘ungroup’ just before loading the grouped data, it works…

You may try to clear all the data from your grid using the removeAll() method:
https://docs.dhtmlx.com/suite/data_collection/api/datacollection_removeall_method/
before loading a new portion of the data