X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..10a866c12701c0a0afd0ac85dcdcf32a421514ac:/docs/output/Ext.data.DirectStore.html diff --git a/docs/output/Ext.data.DirectStore.html b/docs/output/Ext.data.DirectStore.html index 2376bf13..48862bae 100644 --- a/docs/output/Ext.data.DirectStore.html +++ b/docs/output/Ext.data.DirectStore.html @@ -1,4 +1,4 @@ -
Properties Methods Events Config Options Direct Link
Observable
  Store
    DirectStore

Class Ext.data.DirectStore

Package:Ext.data
Defined In:DirectStore.js
Class:DirectStore
Extends:Store
xtype:directstore

Small helper class to create an Ext.data.Store configured with an +

Observable
  Store
    DirectStore

Class Ext.data.DirectStore

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

Small helper class to create an Ext.data.Store configured with an Ext.data.DirectProxy and Ext.data.JsonReader to make interacting with an Ext.Direct Server-side Provider easier. To create a different proxy/reader combination create a basic Ext.data.Store @@ -197,59 +197,59 @@ 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