DevExtreme jQuery - DataSource - store
This option accepts one of the following:
Store instance
An ArrayStore, LocalStore, ODataStore, or CustomStore instance.Store configuration object
An ArrayStore, LocalStore, or ODataStore configuration object. Make sure to set the type option.Array
Assigning an array to the store option automatically creates an ArrayStore in the DataSource.
jQuery
var ds = new DevExpress.data.DataSource({ store: new DevExpress.data.ArrayStore({ // ArrayStore instance }) // ===== or ===== store: { type: "array", // ArrayStore configuration object } // ===== or ===== store: [ { id: 1, name: "John Doe" } ] });
Angular
import DataSource from "devextreme/data/data_source"; import ArrayStore from "devextreme/data/array_store"; // ... export class AppComponent { ds: DataSource; constructor() { this.ds = new DataSource({ store: new ArrayStore({ // ArrayStore instance }) // ===== or ===== store: { type: "array", // ArrayStore configuration object } // ===== or ===== store: [ { id: 1, name: "John Doe" } ] }); } }
type
This option accepts one of the following values:
"array"
Creates an ArrayStore."local"
Creates a LocalStore."odata"
Creates an ODataStore.
Each store has options that are detailed in the links above. Declare these options in the store object.
You can implement custom data access logic as described in the Custom Sources topic if these stores are not suitable.
If you have technical questions, please create a support ticket in the DevExpress Support Center.