我在ext论坛上找到了答案,如果有人感兴趣,这就是解决方案:
{
dataIndex:"authors_name",
id:"authors_name",
header:"Authors",
editable:true,
sortable:true,
editor:{
xtype:"combo",
allowBlank:false,
editable:false,
forceSelection: true,
displayField: 'authors_name',
valueField: 'authors_id',
//Add mode and triggerAction properties to make it work locally
mode:"local",
triggerAction:"all",
store:new Ext.data.JsonStore({
proxy:new Ext.data.HttpProxy({
url: 'index.php?load=categories&request=data&type=getAuthors'
}),
//Use the autoload property to do the request only one time
autoLoad:true,
root: 'items',
fields: ['authors_name','authors_id']
})
}
}