DataCollection API

A set of APIs that allow you to work with data of a component.

Methods

add adds a new item to the component
changeId changes the id of an element of a data collection
copy creates a copy of an item at the defined position
exists checks whether the specified item exists in the component
filter filters items in the component by the specified key
find finds an item that corresponds to the specified parameters
findAll finds all the items that correspond to the specified parameters
forEach iterates over all items of a data collection
getId returns the id of the item by its index
getIndex returns the index of the item by its id
getInitialData returns the initial values of the items of a widget initialized in a data collection
getItem returns the object of an item by its id
getLength returns the number of all elements of a data collection
getLength returns the number of all elements of a data collection
isDataLoaded checks whether the specified data range is loaded from the server
load loads data from an external file
map iterates through all items of the component
mapRange returns a new array of the items correspond to the specified parameters
move moves an item to the defined position
parse loads data from a local data source
reduce reduces the array to a single value
remove deletes the specified item from the component
removeAll deletes all the items from the component
save saves changes made in a data collection to the server side
serialize serializes the component data into JSON, XML or CSV format
sort sorts data items in a component
update updates properties of the item

Events

afterAdd fires after adding a new item into a data collection
afterLazyLoad fires after getting a response from the server
afterRemove fires after removing a new item from a data collection
beforeAdd fires before adding a new item into a data collection
beforeLazyLoad fires before sending a request to the server
beforeRemove fires before removing an item from a data collection
change fires when a data collection is modified
load fires when items are loaded in a data collection
loadError fires when loading of data fails
removeAll fires when all items are removed from a data collection
Back to top