ilh*_*han 16 combobox extjs extjs3
这是我的组合框
{
    xtype: 'combo', 
    fieldLabel: LANG.LOGIN_LANG,
    id : 'lang', 
    store: [
        ['tr','Türkçe'],
        ['ru','???????'],
        ['en','English']
    ],
    mode: 'local',
    triggerAction: 'all',
    selectOnFocus:true
},
M-S*_*M-S 31
通常,当我想选择商店的第一个值时,我使用以下方法:
xtype: 'combo', 
fieldLabel: 'prov',
id : 'lang', 
store:[['tr','Türkçe'],['ru','???????'],['en','English']],
mode: 'local',
triggerAction: 'all',
selectOnFocus:true,
listeners: {
    afterrender: function(combo) {
        var recordSelected = combo.getStore().getAt(0);                     
        combo.setValue(recordSelected.get('field1'));
    }
}
Mch*_*chl 21
{
  xtype: 'combo', 
  fieldLabel: LANG.LOGIN_LANG,
  id : 'lang', 
  store:[['tr','Türkçe'],['ru','???????'],['en','English']],
  mode: 'local',
  triggerAction: 'all',
  value: 'tr',
  selectOnFocus:true
},
对于远程组合框,您需要插入商店的load事件以选择加载商店后的值.
| 归档时间: | 
 | 
| 查看次数: | 51647 次 | 
| 最近记录: |