View Full Version : how to get combox value by type

22 Jul 2013, 10:34 AM
I created a combox, how can I get value by type? example: when I type my name 't' in combo, I can get it.

this is the code I create, It is not working,

fieldLabel: "Report To",
allowBlank: true,
id: "txtReportTo",
name: "txtReportTo",
//forceSelection: true,
xtype: "combo",
store: reporttostore,
valueField: 'name',
displayField: 'name',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
// selectOnFocus: true,
listeners: {
'render': function (c) {
c.getEl().on('keyup', function () {
var reportto = this.getValue();
reporttostore.baseParams = { columns: reporttostore.fields.keys.toString(), reportto: reportto };
}, c);

Any suggestion,many thanks.

Renan Cunha
22 Jul 2013, 3:20 PM
You can use the method getRawValue of the combobox component for get the current value (displayField in this case) of the field.

23 Jul 2013, 4:41 AM
Thanks Renan.