52,797
社区成员
发帖
与我相关
我的任务
分享
//store
var cbstore = new Ext.data.Store({
singleton:true,
autoDestroy:true,
fields:[
'groupId',
'groupName'
],
proxy:{
type:'ajax',
url:'usergroup.action',
reader:'json'
},
autoLoad:true
});
//grid显示 列
{
header:'用户组',
dataIndex:'userGroupName',
align:'center',
editor: new Ext.form.field.ComboBox({
typeAhead:true,
//readOnly:true,
queryMode:'local',
id:'cmbId',
triggerAction:'All',
valueField:'groupId',
displayField:'groupName',
store:cbstore,
lazyRender:true
}) ,
renderer: function(value,metadata,record){
var index = cbstore.find('groupId',value);
if(index!=-1){
return cbstore.getAt(index).data.groupName;
}
return value;
}
}