Sets the specified value(s) into the field. For each value, if a record is found in the store that matches based on the valueField, then that record's displayField will be displayed in the field. If no match is found, and the valueNotFoundText config option is defined, then that will be displayed as the default field text. Otherwise a blank value will be shown, although the value will still be set.
Parameters
- value : String|Array
The value(s) to be set. Can be either a single String or Ext.data.Model, or an Array of Strings or Models.
Returns
- Ext.form.field.Field
this
單一:Ext.getCmp("1945").setValue(“1”);
多個:用數組
var value=[1,2,3];
Ext.getCmp("1945").setValue(value.split(','));