DHTMLX Docs & Samples Explorer

getItemDataObject(itemId)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxfolders.js

returns data object item based on (it can be XML node or json object or other type of object, depending on datasource which was used).

  • itemId - id of item to get data object from

The following code gets XML node from which item was created (in this case - active item). Then you can work with it as with any other XML element.

   var xmlNode = myFolders.getItemDataObject(myFolders._activeItemId);
   alert(xmlNode.getAttribute("name"));