Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Subathra on Sep 03, 2009 23:42
open dhtmlx forum
Grid linked to tree

Hi,

Now i am using multiple trees based on each column in TreeGrid like Category, Location, etc., and i have to filter the tree for each and every rows. Now i have to do the child row tree will be changed when clicked the parent tree category. How can it is possible? Please help me.

Regards,
P.Subathra
Answer posted by Alex (support) on Sep 04, 2009 03:47

Tree has "onClick" event. You can use it:

tree.attachEvent("onClick",function(itemId){

/* your code here */

})

Answer posted by subathra on Sep 04, 2009 04:07
Hi,

          Ok fine. But i have a grid and i want to display the Child row's category tree based on Parent row category selection, because of category also have a lot of children. So i have filter in each and every child rows.

Thanks & Regards,
   P.Subathra
Answer posted by Alex (support) on Sep 04, 2009 05:51

Hello, 

 grid can have only one tree per column. 

The only possible solution is to reload this tree when it's necessary:

mygrid.attachEvent("onEditCell",function(stage,row_id,cell_index){
  if(stage==0)
     if(...){
       tree.deleteChildItems(0)
       tree.loadXML(...)
     }
   return true
})

Answer posted by Subathra on Sep 09, 2009 02:33
Hi Alex,

        Thanks a lot. I have displayed multiple tree in single treegrid. I tried in sample programme. It is working good. Now i want to select the existing value for each cell with tree in treegrid. Is it possible then what should i do? 

Please help me.

Thanks & Regards,
    P.Subathra