gpt4 book ai didi

c# - 无法在 ItemSelector EXTJS 3 中显示所选项目

转载 作者:行者123 更新时间:2023-11-28 09:59:02 25 4
gpt4 key购买 nike

我正在开发 ASP 项目,在 View 中使用 extjs。我在 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 的引用请给我解决这个问题的方案...

最佳答案

您设置表单的 store 属性。这是不正确的。尝试在您的项目选择器中设置存储。

关于c# - 无法在 ItemSelector EXTJS 3 中显示所选项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9510697/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com