私はASPプロジエクトを開発していますビューでextjsを使用しています。 EXTJSでItemSelectorを使うと問題があります。ItemSelectorで選択された項目を表示できませんEXTJS 3
これは私のコードです:
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は、フォームのストアプロパティを設定...
どこに店を置くべきですか?私がそれをアイテムに入れると、それは誤りに対抗しました。メッセージは「オブジェクトはヌルです」 私はそれをどこに置くべきですか?ありがとうinnerJL – indi60
店のデータ形式はこのエラーにどのような影響を与えますか? – indi60
どこかにあなたのサンプルを投稿できますか?例えばjsfiddleで?コードだけで伝えるのは本当に難しいです。たとえば、ajaxデータを単純なデータ配列に置き換えることができます。 Jsonを使用して –