[CLOSED] Set Combo Box selected item on page load

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [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 getting

    Uncaught 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]

Similar Threads

  1. Replies: 3
    Last Post: May 14, 2013, 4:03 AM
  2. Replies: 3
    Last Post: May 06, 2013, 6:44 AM
  3. Replies: 0
    Last Post: Apr 17, 2013, 7:41 AM
  4. Replies: 17
    Last Post: Dec 17, 2012, 11:58 AM
  5. [CLOSED] Load RadioGroup Item from database on Combo Select event
    By webclouder in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 16, 2010, 8:30 PM

Posting Permissions