Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Jun 24, 2008 08:17
open dhtmlx forum
dhtmlXTree

Is there any way to tell if the dhtmlXTree has changed since it was loaded? ie, has a user moved a node, added/deleted a node, changed the text of a node, etc, etc, etc?
Answer posted by Support on Jun 24, 2008 08:32
There are two ways

a) serialize tree exactly after loading, and when necessary serialize it again and compare two serialization strings

or

b) the tree provides events for each mentioned action, it possible to attach custom event handlers, so they will trigger some kind of update flag

var updated=false;
    tree.attachEvent("onEdit",function(){
       updated=true;
       return true;
    })