当前位置: 代码迷 >> Web前端 >> 编者Grid列动态获取ComboBox.store
  详细解决方案

编者Grid列动态获取ComboBox.store

热度:750   发布时间:2013-12-30 14:16:08.0
编辑Grid列动态获取ComboBox.store
var cm = new Ext.grid.ColumnModel({
					columns : [sm, new Ext.grid.RowNumberer(), {
									header : 'projectchecksetid',
									dataIndex : 'projectchecksetid',
									hidden : true
								},{
									header : 'proTypeId',
									dataIndex : 'globalType',
									hidden : true,
									renderer : function(globalType) {
										if (globalType){
											proTypeId = globalType.proTypeId;
											var cbdepartment = Ext.getCmp('cbdepartment');
											cbdepartment.store.proxy= new Ext.data.HttpProxy({url: __ctxPath+'/project/comboProjectCheckSet.do?proTypeId='+proTypeId});
											cbdepartment.store.load();
											return globalType.proTypeId;
										}
									}
								},{
									header : '岗位名称',	
									dataIndex : 'positionname'
								},{
									header : '人员姓名',	
									dataIndex : 'username'
								},{
									header : '审批顺序',	
									dataIndex : 'degree',
									editor : new Ext.form.ComboBox({
										id: "cbdepartment",
										valueField : 'degree',
										displayField : 'degree',
										forceSelection: true, 
										selectOnFocus: true, 
										typeAhead: true, 										
										store:new Ext.data.JsonStore({
											//autoLoad:true,
											url:__ctxPath+'/project/comboProjectCheckSet.do',
											fields:['degree','degree'],
											root:'data'
										}),
										mode : 'local',
										triggerAction : 'all',
										mode: 'local', 
										lazyRender: true ,
										editable : false
										
									})
								}],
					defaults : {
						sortable : true,
						menuDisabled : false,
						width : 100
					}
				});

?

  相关解决方案