Jul 21, 2010, 11:18 AM
How to load itemselector
How to load data in itemselector
After ajax i got data in array and called the below function, Now what i have to do to show data in itemselector
After ajax i got data in array and called the below function, Now what i have to do to show data in itemselector
loadInvestMultilist: function() {
var investData = arguments[0].reportData;
this.fromStore = new Ext.data.Store({
id: 'fromStore',
data: investData,
reader: new Ext.data.JsonReader(
{
id: 'Id'
},
Ext.data.Record.create([
{ name: 'Id', mapping: 'Id' },
{ name: 'Name', mapping: 'Name' }
])
)
});
this.toStore = new Ext.data.Store({
id: 'toStore',
data: this,
reader: new Ext.data.JsonReader(
{
id: 'Id'
},
Ext.data.Record.create([
{ name: 'Id', mapping: 'Id' },
{ name: 'Name', mapping: 'Name' }
])
)
});
}
here is code for my itemselectoritems: {
xtype: 'itemselector',
name: 'investSelector',
id: 'investSelector',
imagePath: "ExtLib/plugins/images/",
imagePath: Module.getEnv('EXTUX_MULTISELECT_PATH')+"images/",
drawUpIcon: false,
drawDownIcon: false,
drawTopIcon: false,
drawBotIcon: false,
width: 400,
height: 180,
multiselects: [{
width: 150,
height: 150,
legend: " ",
draggable:false,
droppable:false,
store:this.fromStore,
displayField: 'Name',
valueField: 'Id'
},{
width: 150,
height: 150,
legend: " ",
draggable:false,
droppable:false,
store: this.toStore,//[["0", "All"]],
displayField: 'Name',
valueField: 'Id'
}]
}
Last edited by geoffrey.mcgill; Jul 21, 2010 at 9:07 PM.
Reason: please use [code] tags