PDA

View Full Version : How to insert a default value to combobox after getting data from proxy via autoLoad?



silent
25 Oct 2011, 1:25 AM
Hey guys,

I'm trying to put a default value to my combobox after getting data from my proxy via ajax and autoLoad. How can I add a prompt/default value at top (insert in index 0) of my combobox store?

The callback of the load function, doesn't work.

Is a solution out there?

Many thanks! ~o)

droessner
25 Oct 2011, 9:03 AM
I handle it this way:



listeners: { load: function(store) {
var record = {};




record[me.valueField] = '';
record[me.displayField] = '\u00a0';
store.insert(0, record);
}
}