TreeCollection API

A set of API methods that allow you to work with data of a component with tree-like structure.

Methods

add adds an item to a component
canCopy checks whether it is possible to copy a control into some other control
copy adds a copy of an item and places it in the specified position
eachChild iterates through child items of a control
eachParent iterates through all the parent items (the immediate parent and its parent, etc until the parent is the component itself)
exists checks if the control exists
filter filters controls by some criteria
getId gets the ID of an item
getIndex gets the current position of an item
getItem gets an item by its ID
getItems gets the child items of a control
getLength counts child items of a control
getParent gets the ID of the parent of the control
getRoot returns the ID of the master component
haveItems checks whether an item has children
isSaved checks whether the changes made in a tree collection are saved to the server side
load loads items from a file
loadItems loads child items of a control from a file
map iterates through items
move moves items to different positions
parse loads a collection of items from a local source
refreshItems refreshes child items of a control
remove removes an item
removeAll clears the component of all controls
restoreOrder restores the component to the state previous to sorting / filtering
save saves changes made in a tree collection to the server side
serialize returns a collection of all items
sort sorts controls according to some criteria
update changes an item

Events

AfterAdd fires after adding a new item into a tree collection
AfterRemove fires after removing a new item from a tree collection
BeforeAdd fires before adding a new item into a tree collection
BeforeRemove fires before removing an item from a tree collection
Change fires when a tree collection is modified
Load fires when items are loaded in a tree collection
LoadError fires when loading of data fails
RemoveAll fires when all items are removed from a tree collection
Back to top