X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..10a866c12701c0a0afd0ac85dcdcf32a421514ac:/docs/output/Ext.data.Store.html?ds=inline diff --git a/docs/output/Ext.data.Store.html b/docs/output/Ext.data.Store.html index 5ba454c6..4a7b4e6f 100644 --- a/docs/output/Ext.data.Store.html +++ b/docs/output/Ext.data.Store.html @@ -1,4 +1,4 @@ -
Properties Methods Events Config Options Direct Link
Observable
  Store

Class Ext.data.Store

Package:Ext.data
Defined In:Store.js
Class:Store
Subclasses:ArrayStore, DirectStore, GroupingStore, JsonStore, XmlStore
Extends:Observable
xtype:store

The Store class encapsulates a client side cache of Record +

Observable
  Store

Class Ext.data.Store

Package:Ext.data
Defined In:Store.js
Class:Store
Subclasses:ArrayStore, DirectStore, GroupingStore, JsonStore, XmlStore
Extends:Observable

The Store class encapsulates a client side cache of Record objects which provide input data for Components such as the GridPanel, the ComboBox, or the DataView.

Retrieving Data

@@ -229,60 +229,60 @@ If the Reader was constructed by passing...
The Ext.data.Record.create for additional details).

This property may be used to create new Records of the type held in this Store, for example:

// create the data store
-var store = new Ext.data.ArrayStore({
-    autoDestroy: true,
-    fields: [
-       {name: 'company'},
-       {name: 'price', type: 'float'},
-       {name: 'change', type: 'float'},
-       {name: 'pctChange', type: 'float'},
-       {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
-    ]
-});
-store.loadData(myData);
+    var store = new Ext.data.ArrayStore({
+        autoDestroy: true,
+        fields: [
+           {name: 'company'},
+           {name: 'price', type: 'float'},
+           {name: 'change', type: 'float'},
+           {name: 'pctChange', type: 'float'},
+           {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
+        ]
+    });
+    store.loadData(myData);
 
-// create the Grid
-var grid = new Ext.grid.EditorGridPanel({
-    store: store,
-    colModel: new Ext.grid.ColumnModel({
-        columns: [
-            {id:'company', header: 'Company', width: 160, dataIndex: 'company'},
-            {header: 'Price', renderer: 'usMoney', dataIndex: 'price'},
-            {header: 'Change', renderer: change, dataIndex: 'change'},
-            {header: '% Change', renderer: pctChange, dataIndex: 'pctChange'},
-            {header: 'Last Updated', width: 85,
-                renderer: Ext.util.Format.dateRenderer('m/d/Y'),
-                dataIndex: 'lastChange'}
-        ],
-        defaults: {
-            sortable: true,
-            width: 75
-        }
-    }),
-    autoExpandColumn: 'company', // match the id specified in the column model
-    height:350,
-    width:600,
-    title:'Array Grid',
-    tbar: [{
-        text: 'Add Record',
-        handler : function(){
-            var defaultData = {
-                change: 0,
-                company: 'New Company',
-                lastChange: (new Date()).clearTime(),
-                pctChange: 0,
-                price: 10
-            };
-            var recId = 3; // provide unique id
-            var p = new store.recordType(defaultData, recId); // create new record
-            grid.stopEditing();
-            store.insert(0, p); // insert a new record into the store (also see add)
-            grid.startEditing(0, 0);
-        }
-    }]
-});
Store

Public Methods

MethodDefined By

Public Methods

MethodDefined By