PDA

View Full Version : how get store from a comboBox?



klaygomes
29 Nov 2007, 5:37 AM
I have the folowing comboBox:


// JavaScript Document
var colabComboBox = function(){
var combo = new Ext.form.ComboBox({
store: new Ext.data.Store({
url: '/xmlFeed/colaData.asp',
reader: new Ext.data.XmlReader({
record: 'analista',
forceFit :true,
totalRecords:'total'
}, [
'NomeAnalista', 'chaveIntranet', {name: 'codColab', mapping: 'codColab', type: 'string'}
]),
autoLoad: true
}),
tpl: new Ext.XTemplate(
'<tpl for=".">'+
'<div class="x-combo-list-item">'+
'<nobr><img src="/fotoscolab/close{codColab}.jpg" width="28" height="28" style="float:left !important" />'+
'<span style="text-transform:capitalize">{NomeAnalista}</span></nobr><br />'+
'<sup>{chaveIntranet}</sup>'+
'</div></tpl>'
),
itemSelector: 'div.x-combo-list-item',
emptyText:'Selecione',
fieldLabel:'Analista',
displayField:'NomeAnalista',
valueField: 'chaveIntranet',
name:'x-colab',
id:'x-colab',
listClass:'display: nono',
typeAhead: true,
width: 240,
mode: 'remote',
triggerAction: 'all',
pageSize : 10,
forceSelection: true,
allowBlank: false
});

return {
combo:combo,
store: /** i wanna get store here **/
}
}();

I was trying to do something like gridPanel where we use getStore... but doesn't work:((

29 Nov 2007, 5:44 AM
colabComboBox.store property

santosh.rajan
29 Nov 2007, 5:45 AM
try combo.store

klaygomes
29 Nov 2007, 5:49 AM
djliquidice, santosh.rajan thanks!!

[COLOR="LemonChiffon"]why isnt it on docs?