Properties Methods Events Config Options Direct Link
Observable
  Store
    ArrayStore

Class Ext.data.ArrayStore

Package:Ext.data
Defined In:ArrayStore.js
Class:ArrayStore
Extends:Store

Formerly known as "SimpleStore".

Small helper class to make creating Ext.data.Stores from Array data easier. An ArrayStore will be automatically configured with a Ext.data.ArrayReader.

A store configuration would be something like:

var store = new Ext.data.ArrayStore({
    // store configs
    autoDestroy: true,
    storeId: 'myStore',
    // reader configs
    idIndex: 0,  
    fields: [
       'company',
       {name: 'price', type: 'float'},
       {name: 'change', type: 'float'},
       {name: 'pctChange', type: 'float'},
       {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
    ]
});

This store is configured to consume a returned object of the form:

var myData = [
    ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
    ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
    ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am'],
    ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
    ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am']
];
An object literal of this form could also be used as the data config option.

*Note: Although not listed here, this class accepts all of the configuration options of ArrayReader.

Config Options

Config OptionsDefined By
 data : Array
An inline data object readable by the reader. Typically this option, or the url option will be specified.
Store
 proxy : Ext.data.DataProxy
The DataProxy object which provides access to a data object. See url.
Store

Public Properties

PropertyDefined By
 fields : Ext.util.MixedCollection
A MixedCollection containing the defined Fields for the Records stored in this Store. Read-only.
Store
 multiSortInfo : Object
Object containing overall sort direction and an ordered array of sorter configs used when sorting on multiple fields
Store
 {Boolean} : Object
isDestroyed True if the store has been destroyed already. Read only
Store

Public Methods

MethodDefined By

Public Events

EventDefined By