Ext JS - Learning Center

Manual:Data:Stores:SimpleStore

From Learn About the Ext JavaScript Library

Jump to: navigation, search

Ext Manual > Data > Stores >

Ext.data.SimpleStore

Example

Ext.exampledata.states = [
  ['AL', 'Alabama'],
  ['AK', 'Alaska'],
  ['AZ', 'Arizona'],
  /* ... */
  ['WV', 'West Virginia'],
  ['WI', 'Wisconsin'],
  ['WY', 'Wyoming']
];

var store = new Ext.data.SimpleStore({
  fields: ['abbr', 'state'],
  data : Ext.exampledata.states // from states.js
});

var combo = new Ext.form.ComboBox({
  store: store,
  displayField:'state',
  typeAhead: true,
  mode: 'local',
  triggerAction: 'all',
  emptyText:'Select a state...',
  selectOnFocus:true,
  width:135
});

Links

  • This page was last modified on 2 August 2007, at 09:08.
  • This page has been accessed 15,612 times.