Ext Combobox 多選時候,數據取回後設定默認。

( String|Array value ) : Ext.form.field.Field
Sets the specified value(s) into the field. ...

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(','));

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章