EXTJS 3.0 资料 控件之 combo 用法
2014-12-31 11:43
302 查看
EXTJS combo 控件:
1.先定义store
2.定义combo控件
1.先定义store
//年款 var comboData_ReleasYear = [ ['0', '2010'], ['1', '2011'], ['2', '2013'], ['3', '2014'] ];
2.定义combo控件
{ layout: 'form', labelWidth: 50, width: 260, items: [{ xtype: 'combo', name: 'ReleasYear', allowBlank: false, fieldLabel: '年款', width: 150, store: new Ext.data.SimpleStore({ fields: ['Id', 'Name'], data: comboData_ReleasYear }), valueField: "Id", displayField: "Name", mode: 'local', editable: false, triggerAction: 'all', allowBlank: false, autoload: true, listeners: { 'select': function (combo, record, index) { var ReleasYear = PKUPanelForm.form.findField('ReleasYear').getRawValue(); if (ItemStorePKU.getCount() == 0) { ItemStorePKU.insert(0, new ItemStorePKU.recordType({ ReleasYear: ReleasYear }));//插入到最后一行 } else { for (var i = 0; i < ItemStorePKU.getCount() ; i++) { ItemStorePKU.insert(i, new ItemStorePKU.recordType({ ReleasYear: ReleasYear }));//插入到最后一行 } } } } } ] }
相关文章推荐
- EXTJS 3.0 资料 控件之 Toolbar 两行的用法
- EXTJS 3.0 资料 控件之 itemselector 用法
- EXTJS 3.0 资料 控件之 html 潜入label用法
- EXTJS 3.0 资料 控件之 FormPanel 插入button用法
- EXTJS 4.2 资料 控件之checkboxgroup的用法(动态数据)
- EXTJS 4.2 资料 控件之textfield文本框加事件的用法
- EXTJS 4.2 资料 控件之combo 联动
- EXTJS 4.2 资料 控件之 Store 用法
- EXTJS 3.0 资料 控件之 GridPanel属性与方法大全
- EXTJS 4.2 资料 控件之Window窗体相关属性的用法
- EXTJS 4.2 资料 控件之checkboxgroup的用法(静态数据)
- EXTJS 4.2 资料 控件之radiogroup 的用法
- MFC_Combo_Box(组合框)控件的用法
- EXTJS 4.2 资料 控件之btn设置可否点击
- 关于extJS3.2版本中设置datefield控件和combo控件等只读的问题
- EXTJS 4.2 资料 控件lable定义
- EXTJS 4.2 资料 控件之tabpanel 静态生成tabpanel
- EXTJS 4.2 资料 控件之Grid 添加行,编辑行,删除行
- EXTJS 4.2 资料 控件之Window窗体添加html
- EXTJS 4.2 资料 控件之Window窗体自动填充页面