?
?
{
header : '使用人',
dataIndex : 'username',
editor : new Ext.grid.GridEditor(new Ext.form.TextField({
allowBlank : false,
editable : false,
blankText : '使用人不能为空',
listeners : {
'focus' : function(thiz) {
Ext.getCmp('lowfixedDetailGrid').getColumnModel().setHidden(8,false);//编辑时显示该列
UserSelectorTwo.getView(function(id, name, department) {
thiz.setValue(name);
Ext.getCmp('department').setValue(department);
//Ext.getCmp('lowfixedDetailGrid').getColumnModel().setHidden(8,true);
}, true, true, __currentUserDept).show();
}
}
})),
width : 60
}, {
header : '',//部门
hidden : false,//隐藏时值放不进来
dataIndex : 'department',
editor:new Ext.grid.GridEditor(
new Ext.form.TextField({
allowBlank: true,
id:'department',
readOnly:true
})),
width : 0
}
选择‘ 使用人’就可以带出’部门‘(第8列)信息,由于使用了Ext.grid.RowEditor插件‘部门’列隐藏时选择‘ 使用人’时带出的值无法正确对映;
?
?
则通过‘ 使用人’的focus事件,聚焦时显示该列,编辑完成后就又隐藏该列
?
plugins : [new Ext.ux.grid.RowEditor({
saveText : '保存',
cancelText : '取消',
errorText : '请输入完整信息'
,
listeners : {'afteredit':function(){
Ext.getCmp('lowfixedDetailGrid').getColumnModel().setHidden(8,true);//编辑结束隐藏该列
}}
})],
?可达到效果;
注:(设置该列宽度为0时还是会显示半个字符)
