Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by roxana aioanei on Apr 24, 2008 09:39
open dhtmlx forum
How can I add checkbox in the first dhtmlXtreegrid with the same functionality as in dhtmlxtree . How can I make the functionality to change the image when I expande the dhtmlxtreegrid node.

Answer posted by Support on Apr 25, 2008 03:56
>>How can I add checkbox in the first dhtmlXtreegrid with the same functionality as in dhtmlxtree .
The treegrid supports only two state checkboxes, you can add them as separate column of ch type   
    mygrid.setColTypes("ch,tree,ro,ro);

>>How can I make the functionality to change the image when I expande the dhtmlxtreegrid node.
There is no such built in functionality, but you can use onOpenEnd event
    grid.attachEvent("onOpenEnd",function(id,state){
          if (state>0) grid.setItemImage(id,"open.gif");
          else grid.setItemImage(id,"close.gif");
       return true;
    })