Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Feb 13, 2007 14:17
open dhtmlx forum
How would one capture the revised tree structure as part of dragging and

How would one capture the revised tree structure as part of dragging and dropping to be passed to the database. We have an orgtree in which each tree node (unit) has a unique id, which points to the id of the parent node (unit), which we can load into your tree as a well-formed tree of lets say max 3000 units, then we could reshuffle with drag and drop and export to XML (I see this can be saved into a text field which one can capture, correct?).

 

How would you see is the best way to update the database with the resulting XML ?
Answer posted on Feb 13, 2007 14:18

For dhtmlxTree and dhtmlxTreeGrid (Grid) we have an extension called dhtmlxDataProcessor. It can automatically update datasource on server side after common client side actions: add node/row, delete node/row, drag-n-drop, update.

For more details about dhtmlxGrid implementation please see:

../dhtmlxGrid/doc/guide.html#dblink

 
For more details about dhtmlxTree implementation please see:

../dhtmlxTree/doc/guide.html#dataprocessor

 
dhtmlxDataProcessor and usage samples are included into dhtmlxTree Professional package (so, you have it)

 
Another way to update the datasource is (as you said) - get xml from tree (serialize) and submit it to server. In this case you'll have to loop through the xml and update corresponding records in database.

Answer posted by Embre (Support) on Dec 01, 2014 15:32

If you haven't found the needed information there and still looking for a solution, you will find the additional help checking xml javascript ajax and basic javascript calendar.