View Full Version : Setting default value to Combo Ext 4.X

26 Sep 2011, 2:22 PM
I have a issue with setting the value to a combo when the control is loaded

xtype: 'combo',
store: 'eventActionStore',
name: 'eventaction',
labelAlign: 'top',
allowBlank: false,
blankText: "Event Action is required field",
editable :false,
fieldLabel: 'Action',

if the give a id property to the combo then it will set the value,
but i dont want to give a ID to the control so i have given a 'name' property, by doing this it will not set the value( By default ) when the control is loaded

26 Sep 2011, 5:43 PM
Whether the component has an ID or a name should not be relevant to the handling of the default value - at least in a standard ComboBox.

I think that either your observation (default value behavior changes whether component has ID or name) is incorrect, or there is custom code involved that refers to that ID.

Please re-check your observation and/or provide more code.