Check documentation for the latest version of dhtmlxSuite setUserData DHTMLX Docs

setUserData

allows attaching user data to a treeview without modifying the DOM

void setUserData(string|number id,string name,string value);
idstring|numberthe item's id
namestringthe name of the userdata
valuestringthe value of the userdata

Example

myTreeView.setUserData(id, "type", "folder");

See also
Back to top