Mar 24, 2015, 8:50 AM
[CLOSED] Set Combo Box selected item on page load
For my combo box
X.ComboBoxFor(m => m.TYPE).ID("ComboBoxType").MultiSelect(false).LabelWidth(50).Width(150).Editable(false).Items(new ListItem("Invoice", "INV"), new ListItem("Pro-Forma", "PRO")).SelectedItems(X.ListItem().Value("INV")),
I would like to select the first item on opening the window where the combo box is.Ext.onReady(function() {
var combo = Ext.getCmp('ComboBoxType');
combo.setValue('INV');
});
I keep gettingUncaught TypeError: Cannot read property 'setValue' of undefined
What am I doing wrong please?
Last edited by Daniil; Apr 03, 2015 at 12:08 PM.
Reason: [CLOSED]