Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by oVox on Jan 16, 2008 14:50
open dhtmlx forum
Get Parents

How can i to get all the Parents Ids from a Specific Node on a Tree?
Answer posted by Support on Jan 17, 2008 02:23
By using
    tree.getParentID
you can get direct parent of item , with little effor it possible to receive full list of parents

function getAllParents(id){
    var ar=[id];
       while (id=tree.getParentId(id))
          ar.push(id)
    return ar;
}