View Full Version : ComboBox Transformed

16 Dec 2010, 2:45 PM
Hey I have tried 100 different ways and looked through all the documentation and I can not for the life of me get the selected value out of this combo box when it is selected. The FilterCombo is being added to the tbar of a grid. Ive also tried adding lazyRender: true and that didnt work either.

Ive tried
var val = FilterCombo.getValue();
var val = Ext.getCmp('lac-account-id').getValue();
var val = record.get('account_id');

var FilterCombo = new Ext.form.ComboBox({
id: 'lac-account-id',
typeAhead: true,
triggerAction: 'all',
transform: 'account_id',
width: 200,
emptyText: 'Account Filter',
forceSelection: true,
listeners: {
select: function(combo,record,index){
var val = record.get('account_id');

<select name="account_id" id="account_id">
<option value="0"></option>
<? foreach ($this->accounts as $a){ ?>
<option value="<?=$a['account_id']?>"><?=$a['account_nm']?></option>
<? } ?>

7 Jan 2011, 4:33 PM
Where's your store for this combobox?

8 Jan 2011, 1:57 AM
When using the transform config option, ComboBox will create a store with 'value' and 'text' fields, so you want:

var val = record.get('value');