Problems when using custom images while adding nodes dhtmlxT

Hi,

We want to use custom images at each level of the tree and so we pass the image file names in



insertNewItem( 0, 1, “New Node”, “custom1.gif”, “custom2.gif”,“custom3.gif”) directly.



Everything works with the loading of the tree. However, when selecting tree items, we get the following error;



obj.actionHandler is not a function

[Break on this error] that.callEvent(“onRightClick”,[obj.id,e…bject.id,this.parentObject.checkstate])) line 115.



Also, when locking or unlocking items, these custom images are overridden with default ones.



Can you guys please take a look?



Thanks,

Ravi


Hi,


The 4th paramether is missed in insertNewItem call - it is item onclick handler.


Please, try to use the following method:


insertNewItem( 0, 1, “New Node”, null,“custom1.gif”, “custom2.gif”,“custom3.gif”);


>> Also, when locking or unlocking items, these custom images are overridden with default ones.


When you lock an item, it changes icons. These icons can be set by setLockIcons method.


If the item is unlocked, it gets its previous icon: “custom1.gif”, or “custom2.gif”, or “custom3.gif”.