How can I add checkbox in the first dhtmlXtreegrid with the

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;
    })