大家好,我初学Extjs4,有很多问题不懂,希望大家帮我看看如何实现这样的要求:要在左边添加多选框,把查询那个地方变成一个下拉列表如图:
如下是我的代码和效果图:(但是我不知道在哪里添加什么代码,希望大神帮我添加)
initComponent : function(){ this.store=new Ext.data.JsonStore({ id:"id", url: this.formatUrl('list'), root:"result", totalProperty:"rowCount", remoteSort:true, fields:this.storeMapping}); this.store.baseParams=Ext.apply({},{limit:this.pageSize||""},{}); if(this.baseQueryParameter){ this.store.on('beforeload',function(store,options){ Ext.apply(store.baseParams,this.baseQueryParameter); },this); } this.store.paramNames.sort="orderBy"; this.store.paramNames.dir="orderType"; this.cm.defaultSortable=true; EasyJF.Ext.CrudPanel.superclass.initComponent.call(this); var viewConfig=Ext.apply({forceFit:true},this.gridViewConfig); this.searchField=new EasyJF.Ext.CrudSearchField({hidden:!this.showSearchField,width:this.searchFieldWidth||100,store:this.store}); var tbar=[ { text: '添加', handler: this.create, cls : "x-btn-text-icon", icon : "images/icons/add.png", scope:this }, { text: '修改', handler: this.edit, cls : "x-btn-text-icon", icon : "images/icons/edit.png", scope:this }, { text: '删除', handler: this.removeData, cls : "x-btn-text-icon", icon : "images/icons/delete.png", scope:this }, { text: '刷新', handler: this.refresh, cls : "x-btn-text-icon", icon : "images/icons/f5.png", scope:this }, { text: '导出', handler: this.exportDatas, cls : "x-btn-text-icon", icon : "images/icons/excel.png", // hidden:!this.showExportData, scope:this }, { text: '导入', handler: this.importDatas, cls : "x-btn-text-icon", icon : "images/icons/import.png", // hidden:!this.showImportData, scope:this }]; if(this.gridButtons)tbar=tbar.concat(this.gridButtons); tbar=tbar.concat(["->",'查询: ',this.searchField]); this.grid=new Ext.grid.GridPanel({ store: this.store, cm: this.cm, trackMouseOver:false, loadMask: true, region:"center", viewConfig:viewConfig, tbar:tbar, bbar: new Ext.PagingToolbar({ pageSize: this.pageSize, store: this.store, displayInfo: true, displayMsg: '记录 {0} - {1} of {2}', emptyMsg: "没有数据记录" }) }); this.grid.on("celldblclick",this.edit,this); this.add(this.grid); this.store.load(); } });其中有用EasyJWeb的增删改查功能。