DevExtreme jQuery - CustomStore Options
byKey
Specifies a custom implementation of the byKey(key) method.
A Promise that is resolved after the data item is loaded. It is a native Promise or a jQuery.Promise when you use jQuery.
cacheRawData
Specifies whether raw data should be saved in the cache. Applies only if loadMode is "raw".
Data caching allows the CustomStore to decrease the number of data requests. On the downside, cached data and data in your source may become out of sync. If keeping them synchronized is crucial in your scenario, disable data caching by setting the cacheRawData property to false. In this case, the CustomStore will send a request for data on every call of the load, byKey and totalCount functions.
See Also
errorHandler
This function accepts a JavaScript Error object as the parameter.
- var store = new DevExpress.data.CustomStore({
- // ...
- errorHandler: function (error) {
- console.log(error.message);
- }
- });
insert
Specifies a custom implementation of the insert(values) method.
A Promise that is resolved after the data item is inserted. It is a native Promise or a jQuery.Promise when you use jQuery.
key
Specifies the key property (or properties) that provide(s) key values to access data items. Each key value must be unique.
load
Specifies a custom implementation of the load(options) method.
An array with data or a Promise that is resolved after data is loaded. It is a native Promise or a jQuery.Promise when you use jQuery.
This function's implementation has certain specifics depending on the UI component in which you use the CustomStore. Refer to the Custom Sources topic of a specific UI component for details:
- DataGrid
- PivotGrid
- TreeList
- List
- Lookup
- SelectBox
- TagBox
- Scheduler
- Chart and other data visualization UI components
See Also
loadMode
Specifies how data returned by the load function is treated.
Specify this property depending on the behavior you implemented for the load function. If this function sends data shaping properties to the server and fetches processed data, then loadMode should be "processed". If the load function simply fetches raw, unprocessed data from the server, set loadMode to "raw". In this case, the raw data will be processed on the client automatically.
See Also
remove
Specifies a custom implementation of the remove(key) method.
A Promise that is resolved after the data item is removed. It is a native Promise or a jQuery.Promise when you use jQuery.
totalCount
Specifies a custom implementation of the totalCount(options) method.
A Promise that is resolved after data is loaded. It is a native Promise or a jQuery.Promise when you use jQuery.
update
Specifies a custom implementation of the update(key, values) method.
A Promise that is resolved after the data item is updated. It is a native Promise or a jQuery.Promise when you use jQuery.
useDefaultSearch
Specifies whether the store combines the search and filter expressions. Defaults to true if the loadMode is "raw" and false if it is "processed".
If you have technical questions, please create a support ticket in the DevExpress Support Center.