-
11 Apr 2010 6:09 AM #1Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,624
- Vote Rating
- 434
EditorGridPanel not editing
EditorGridPanel not editing
The code I have works in a browser but not in my Air app. It displays and adds rows but does not allow editing. I put code from one of the examples in and it does not work either. Anything I have to do in order to get the editing to work in an Air app?
Code:xtype : "editorgrid", id : "addTableFieldsGrid", anchor : "100% 100%", stripeRows : true, viewConfig : { forceFit : true }, selModel : new Ext.grid.RowSelectionModel({ singleSelect : true }), store : new Ext.data.Store({ reader : new Ext.data.JsonReader({}, fieldRecord), proxy : new Ext.data.MemoryProxy([]), sortInfo : {field: "name", direction: "ASC"} }), columns : [ {header : "Name", mapping : "name", editor: new Ext.form.TextField()}, {header : "Type", mapping : "type", editor: new Ext.form.TextField()} ], buttons : [{ text : "Add Field", handler : function() { var store = this.ownerCt.ownerCt.getStore(); store.insert(0, new fieldRecord({ name : "New Field", type : "New Field" })); this.ownerCt.ownerCt.startEditing(0,0); } },{ text : "Remove Field", handler : function() { } }]Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
11 Apr 2010 10:29 AM #2
I cannot reproduce it (using my ext-air adapter). It works for me, both adding and editing.
My fieldRecord (it's not in your code) is:
Just one thing. Column definitions use dataIndex, not mapping!Code:var fieldRecord = Ext.data.Record.create([ {name:'name'}, {name:'type'} });Programming today is a race between software engineers striving to build bigger and better Ń–diot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)
Enhanced ExtJS adapter for Adobe AIR


Reply With Quote