DataLoader
Loads and processes data into a component..
Methods
| add | adds an item to the store |
| clearAll | removes all items from the component |
| count | returns the number of currently visible items |
| exists | checks whether an item with the specified ID exists |
| filter | filters the component |
| find | returns all rows that match the criterion, or only the first one |
| getFirstId | returns the ID of the first item |
| getIdByIndex | returns the ID of the item with the specified index |
| getIndexById | returns the index of the item with the specified ID |
| getItem | gets the object of the data item with the specified ID |
| getLastId | returns the ID of the last item |
| getNextId | returns the ID of an item that is after the specified item, either directly after or after a number of items (defined by the step) |
| getPrevId | returns the ID of an item that is before the specified item, either directly before or before a number of items (defined by the step) |
| load | loads data from an external data source |
| loadNext | sends a request to load the specified number of records to the end of the client-side dataset or to the specified position |
| parse | loads data to the component from an inline data source |
| refresh | repaints the whole view or a certain item |
| remove | removes the specified item/items from datastore |
| serialize | serializes data to an array of JSON objects |
| sort | sorts datastore |
| sync | allows syncing two copies of data (all or just a part of it) from one DataCollection to another |
| updateItem | updates the data item with new properties |
| waitSave | allows to catch the moment when a data operation was saved to the server |
Events
| onAfterAdd | fires after adding an item to the datastore |
| onAfterDelete | fires after an item is removed |
| onAfterLoad | fires after data loading is complete |
| onAfterSort | fires after sorting dataset |
| onBeforeAdd | fires before adding an item to the datastore |
| onBeforeDelete | fires before an item is removed |
| onBeforeLoad | fires immediately before data loading has started |
| onBeforeSort | fires before sorting of the dataset |
| onDataRequest | fires when data from the server is requested for linear data structures (List, DataTable, DataView etc.) to implement dynamic data loading |
| onDataUpdate | fires when a data item is being updated |
| onLoadError | fires when an error occurs during data loading (invalid server side response) |
Properties
| data | JavaScript array containing data for the component |
| dataFeed | alternative data source for filtered and bound data |
| datathrottle | sets the polling interval (the time period between the completion of a network request and the next request for data) |
| datatype | the type of loaded data |
| ready | the event handler is called just after the component has been completely initialized |
| removeMissed | defines how to treat items in case of reloading |
| save | defines URLs for data saving |
| scheme | defines schemes for data processing |
| url | the URL which the component will use to load data after its initialization |
Other
| data | inner DataStore |
| waitData | eventual result of an asynchronous operation ('promise' object) for the loaded data |
Back to top