Ext JS - Learning Center

Manual:Data:Readers:ArrayReader

From Learn About the Ext JavaScript Library

Jump to: navigation, search

Ext Manual > Data > Readers >

Contents

Ext.data.ArrayReader

Example

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'],
  /* ... */
  ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am'],
  ['Walt Disney Company (The) (Holding Company)',29.89,0.24,0.81,'9/1 12:00am']
];

var ds = new Ext.data.Store({
  proxy: new Ext.data.MemoryProxy(myData),
  reader: new Ext.data.ArrayReader({}, [
    {name: 'company'},
    {name: 'price', type: 'float'},
    {name: 'change', type: 'float'},
    {name: 'pctChange', type: 'float'},
    {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
  ])
});

Links

See also

  • This page was last modified 13:27, 7 August 2007.
  • This page has been accessed 4,022 times.