PDA

View Full Version : Reset combobox without initiating Beforequery event



mtan12
28 Jan 2014, 1:22 PM
Hi,

I have several comboboxes and I want to have a clear button to clear all data. However, each combobox has a beforequery event.

If I use this.up("mainContainer").down("#currency").clearValue();, it will clear the value, but at the same time initiate the event. I have even tried setValue(#, false). Is it possible to clear the value without initiating beforequery?

scottmartin
28 Jan 2014, 1:41 PM
Have a look at setRawValue:
http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.form.field.Display-method-setRawValue

mtan12
29 Jan 2014, 6:44 AM
One thing I want to add is you can do a combo.setRawValue('n/a');combo.value = 'n/a';if you want to reset the value without triggering any event