我正在使用视图中的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,请给我解决这个问题的办法…
发布于 2012-03-01 15:59:13
您可以设置窗体的store属性。这是不正确的。尝试在项目选择器中设置store。
发布于 2012-03-07 15:59:14
我正在从数据库重新加载数据,我的项目使用Json来缓冲数据。companyStore的数据格式如下:
{ "totalCount":"4", "data":[
{
"groupID": 1,
"groupName": "Receiving"
},
{
"groupID": 2,
"groupName": "Checking"
},
{
"groupID": 3,
"groupName": "Shipment & Packing"
},
{
"groupID": 4,
"groupName": "Display Stock"
}
] }可以使用ItemSelector吗?在使用数组的sencha示例中。
https://stackoverflow.com/questions/9510697
复制相似问题