How to make dhtmlxTreeGrid eXcell_tree read only variant

I am using dhtmlx Tree Grid v 2.1 on Firefox 3.0.9 on mac 10.5.6

I have a simple three column tree grid initialized as follows:


This works fine, but the first column with the expandable tree control contains an ID, and should not be editable in my app. I noticed the built-in eXcell_tree function is editable. I followed the documentation to create a read only variant:


function eXcell_ro_tree(cell)


this.base = eXcell_tree;


this.edit = function() {}


eXcell_ro_tree.prototype = new eXcell_tree;

I get an error: this.grid._tgc is undefined, dhtmlxtreegrid.js line 416

Please help! What am I doing wrong?

To make “tree” column uneditable you can use method mygrid.enableTreeCellEdit(false). Or you can return false in the “onEdicCell” event handler:


if ((stage==1)&&(cellIndex==0)) return false; // if user will try to edit first column;

return true;