How can I make the tree labels read-only without losing expa

I currently have a tree initialized with the code below:



mygrid = new dhtmlXGridObject(‘gridbox’);

mygrid.selMultiRows = false;

mygrid.imgURL = “…/…/…/dhtmlxGrid/codebase/imgs/icons_greenfolders/”;

mygrid.setHeader(“Delete,Select,Tree,Date”);

mygrid.setInitWidths(“25,50,150,200”);

mygrid.setColAlign(“center,center,left,left”);

mygrid.setColTypes(“img,ch,tree,ro”); <------------------------- My third coltype is a tree

mygrid.setColSorting(“na,na,str,date”);

mygrid.init();

mygrid.loadXML(“test_list_1B.xml”);



I need a tree that does not let me edit the labels but still retains the expand/collapse functionality.

Any suggestions are welcome!



Thanks,

Brent Northey

This is common use-case , so treegrid has special method for it.

treegrid.enableTreeCellEdit(false);