【发布时间】:2012-03-01 04:40:16
【问题描述】:
我在视图中使用 extjs 开发 ASP 项目。我在 EXTJS 中使用 ItemSelector 时遇到问题。
这是我的代码:
var isForm = new Ext.Panel({
fieldLabel: 'Role',
width: 700,
bodyStyle: 'padding:10px;',
store: GroupStore,
//renderTo: 'itemselector',
items: [
{
xtype: 'itemselector',
name: 'itemselector',
fieldLabel: 'ItemSelector',
imagePath: '../../ExtResources/ux/images/',
multiselects: [{
legend: 'Available',
width: 250,
height: 200,
store: GroupStore,
displayField: 'groupName',
valueField: 'groupID'
}
, {
legend: 'Selected',
width: 250,
height: 200,
store: [['','']]
}]
}]
});
这是我的商店:
var GroupStore = new Ext.data.JsonStore({
remoteSort: true,
root: 'data',
//autoLoad: loadStore2,
autoLoad: true,
totalProperty: 'totalCount',
idProperty: 'groupID',
fields: [{
name: 'groupID'
}, {
name: 'groupName'
}],
proxy: new Ext.data.HttpProxy({
//url: 'InputUserLoadHandler.ashx?get=groups&comp=HSO'
url: 'InputUserLoadHandler.ashx?get=groups'
})
});
在“已选择”列无法显示已选择的项目。 我曾经尝试在“可用”列和“已选择”中使用我的商店,但结果是两边都显示了该项目。
this 是我的 ItemSelector 的引用 请给我解决这个问题的方法...
【问题讨论】:
标签: c# javascript .net extjs asp-classic