开发者

using extjs jsonstore subdata in an combo field

开发者 https://www.devze.com 2023-03-06 19:13 出处:网络
following extjs3 problem: i have an json store: dbStore = new Ext.data.JsonStore({ url: \'/?[action开发者_Python百科]=getFormData\',

following extjs3 problem: i have an json store:

dbStore = new Ext.data.JsonStore({
    url: '/?[action开发者_Python百科]=getFormData',
    storeId: 'formdata',
    fields: [{'database':['name', 'id'], 'parameter':['name','id']}],
    autoLoad: true
});

and i create an formpanel with following combo field:

{
xtype: 'combo',
name: 'database',
id: 'database',
store: ???,
fieldLabel: '',
valueField: 'id',
displayField: 'name',
emptyText: 'Select'
}

i want that combo field to use the 'database' fields 'name' and 'id', how to do that??


Try adding root:'database' to your store.

0

精彩评论

暂无评论...
验证码 换一张
取 消