PDA

View Full Version : ComboBox as an editor in a grid (this.store is undefined) issue



oddy
27 Aug 2009, 4:21 AM
Hi guys. Can you explain me what's wrong with my code?
I have a grid, a combobox as editor and lazyRender set to true.

My configuration for the combo is



var editorDomainFeed = {
xtype : "combo"
, lazyRender : true
, anchor : "100%"
, fieldLabel : "Active Feed"
, displayField : "name"
, editable : false
, forceSelection : true
, queryParam : "what"
, allQuery : "feeds"
, triggerAction : "all"
, mode : "remote"
, store : new Ext.data.JsonStore({
autoDestroy : false
, root : "records"
, totalProperty : "totalRecords"
, fields : ["name"]
, proxy : new Ext.data.HttpProxy({
api : {
read : {
method : "GET"
, url : domain_vocabulary_URI
}
}
})
})
};



And it used in a grid as



...
, colModel: new Ext.grid.ColumnModel({
defaults : {sortable : true}
, columns:[{
header: "Feed"
, dataIndex: "active_feed"
, width: 150
, editor: editorDomainFeed
, editable: true
}]
})
...


And it causes exception in ext-all-debug.js when I try to get the data for it.

Please, consider this example:
http://admin.fujiyama.yakuzadev.com/

login/password is admin/passw
Go to: Settings -> Domains and doubleclick on any cell in a Feed column. When you see a combo, try to expand it. It'l fail for some reason.

jjaramillo
10 May 2010, 7:50 AM
Hi, i see you got it working.
I'm having the same problem, could you explain what was happening and how did you solve it?
thanks

jjaramillo
10 May 2010, 8:19 AM
It's ok, in my case, it was the 'root' property of the JsonReader and the structure of the JSon itself.