DHTMLX Docs & Samples Explorer

dhtmlxFolders API Methods

dhtmlxFolders Object

attachEvent add any user-defined handler to available events

clearAll clears Folders content

deleteItem deletes item(s)

detachEvent removes an event

drawPager draws pages and put them into the element specified with setPagerContainer. Override this method to have your own style of paging

enableContextMenu enables/disables context menu

enableDragAndDrop enables drag-n-drop in Folders

enableEditMode turns on/off edit mode for dhtmlxFolders object

enablePaging enables/disables paging in Folders and sets number of items per page to use

enableSelection sets selection mode

enableXMLSmartRefresh enables/disables smart refresh mode, when loading XML proceeds to refreshing folders content if any new item came from server

filterClear clears all filters

filterItems filters items using filterFunc and mask

forEachSelected Applies function func to each selected item

getCurrentPage gets currently opened page index (1 based)

getItem gets Folders Item object

getItemDataObject 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).

getItemsNum gets number of items currently known to Folders object (it can be chnaged then if dynamical loading is allowed)

getNumberOfPages gets number of pages in paging

getSelectedId gets selected item(s) id

goToPage opens specified page if paging enabled

loadXML populates Folders from XML file

loadXMLString populates Folders from XML String

moveItem moves item

selectItem selects specified item in Folders

setCSSBaseName sets some name to be used in top css class name for Folders Item by the following schema: dhx_folders_[CSSBASENAME_]item

setImagePath sets new base dir for images used

setItemTagName defines what tag in XML will be consdered as item. By default it is “item”

setItemType defines type of items (see among defined types)

setPagerContainer sets container object for paging

setUserData sets userdata pair - name-value (if you use global variable with same name in xsl file, then it's value will be set to the value of userdata with this name)

sortItems sorts items

unselectAll clears selection in Folders