Tree database structure - TreeCollection API

I’ve found similar posts to this question but some of them are over 10 years old.

Is there any example of a database structure for the DhtmlXTree ?
Also coudn’t find any examples for the methods ‘save, update, etc’ using the TreeColletion API.

Is the TreeCollection API the best API for live Synchronisation ?

The example data structure for the Tree object is shown here.

With DHX6, the structure of the database is irrelevant, as is the implementation of the CRUD (Create, Read, Update, Delete) actions. DHX6 only cares about the JSON data; how the data is provided is entirely up to the user/developer. You’ll need to create your own web API for handling the database interaction. Even the TreeCollection API that DHX6 provides is only for the JSON data object. Updating the database with any changes involves detecting changes to the data through the events of the DHX object (for instance, the Tree object), and then using AJAX calls to your web API to update the database. DHX provides the dhx.ajax object, or you can use jQuery or some other AJAX structure as you wish.

1 Like

Ok, I think I got it.
I’ll make some tests and report here later.
Thank you so much