PDA

View Full Version : How to get selected records from itemSelector



rahulmca1@gmail.com
19 Oct 2009, 10:44 PM
Hi,

I am using itemselector and rendering it as a body of a window.


var ds = new Ext.data.ArrayStore({
data: [[123,'Picture'],
['1', 'Article'], ['2', 'All'], ['3', 'Text'], ['4', 'Test']],
fields: ['value','text'],
sortInfo: {
field: 'value',
direction: 'ASC'
}
});

controllersflowItemSelector = new Ext.ux.ItemSelector({
drawUpIcon: false,
drawDownIcon: false,
drawTopIcon: false,
drawBotIcon: false,
fieldLabel: 'Select Controllers',
imagePath: '/thirdParty/ext-3.0/ux/images/',
renderTo: 'controllersItemselector',
multiselects: [{
title: 'Available Controllers',
width: 280,
height: 250,
store: ds,
displayField: 'text',
valueField: 'value'
},{
title: 'Selected Controllers',
width: 280,
height: 250,
store: [],
tbar:[{
text: 'clear',
handler:function(){
itemSelector.reset();
}
}]
}]
})


Window has ok button whose handler extracts Selected Controllers from item selector.

My question how do I get the Selected Controllers.

Tried
controllersflowItemSelector.multiselects[1].store but it returned "".

How do I extract selected records from controllersflowItemSelector ?

thanks...:)