Data for DevExtreme widgets can be loaded from a locally located resource and from a remote service. To simplify your work with data, DevExtreme supplies a Data Library. This library includes the DataSource object that keeps sorting, grouping, filtering and data transformation options, and applies them each time data is loaded. The DataSource underlying data access logic is isolated in a Store. Unlike the DataSource, a Store is a stateless object implementing a universal interface for reading and modifying data. Each Store contains the same set of methods.
The following Store types are implemented out of the box.
- Array Data Store (takes an array of data).
- Local Data Store (works with the window.localStorage object).
- OData Store (works with the OData protocol).
All these Stores have a single interface and thus can be easily changed to use another data source. In this tutorial, you will learn how to create a DataSource object for the dxDataGrid widget using a custom Store that accesses data from a custom service in a JSON format.