X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..92c2b89db26be16707f4a805d3303ab2531006e1:/docs/output/Ext.data.DirectStore.html?ds=inline diff --git a/docs/output/Ext.data.DirectStore.html b/docs/output/Ext.data.DirectStore.html index 526116fd..72ee5521 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,67 +197,69 @@ 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
\ No newline at end of file +Success of the action is determined in the...
Fires if the server returns 200 after an Ext.data.Api.actions CRUD action. +Success of the action is determined in the result['successProperty']property (NOTE for RESTful stores, +a simple 20x response is sufficient for the actions "destroy" and "update". The "create" action should should return 200 along with a database pk).
Listeners will be called with the following arguments:
Store \ No newline at end of file