The Store class encapsulates a client side cache of Model objects. Stores load data via a Proxy, and also provide functions for sorting, filtering and paging the model instances contained within it.
Creating a Store is easy - we just tell it the Model and the Proxy to use for loading and saving its data:
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
The Store class encapsulates a client side cache of Model objects. Stores load data via a Proxy, and also provide functions for sorting, filtering and paging the model instances contained within it.
Creating a Store is easy - we just tell it the Model and the Proxy to use for loading and saving its data:
var Store=Ext.define('MyApp.store.Users', { extend: 'Ext.data.Store', model: 'MyApp.model.User', proxy: { type: 'ajax', url: '/api/dashboard', reader: { type: 'json', root: 'Users', totalProperty: 'TotalCount' } }, remoteSort: true, sorters: [{ property: 'UserName', direction: 'asc' }], autoLoad: { start: 0, limit: 5 }, pageSize: 5, });Thanks.