Thursday, 19 September 2013

Extjs 3.4 ComboBox: how to preselect a record when the combobox is first loaded?

Extjs 3.4 ComboBox: how to preselect a record when the combobox is first
loaded?

I'm using Extjs 3.4. I need to set up a type ahead combobox like this: The
combobox is using a JsonStore, when the combobox is first loaded onto the
page, I need to preselect a value. Later on, the user can change the value
to other record.
combobox.store.on("load",function(){
combobox.setValue(value);
});
But the value will be set every time the combobox is loaded. I only need
to set up the value when it is first loaded.
Thanks in advance!

No comments:

Post a Comment