{
title: '名称',
field: 'id',
align: 'center',
width: 140,
formatter: function (value, row, index) {
return row.name;
},
editor: {
type: 'combobox',
options: {
valueField: 'id',
textField: 'name',
data: list,
panelHeight: 'auto',
multiple: false
}
}
},
//从后台将获取回来的数据更改combox里的data数据即可
var idbox = detGrid.datagrid('getEditor', {index: editIndex, field: 'id'});
$(idbox.target).combobox('loadData', list);
//设置只读必填
$(idbox .target).combobox({required: false});
$(idbox .target).combobox({readonly: true});
设置隐藏列
onLoadSuccess: function (data) {
if (tabIndex === 0) {
intGrid.datagrid("hideColumn", "name"); // 设置隐藏列
} else {
intGrid.datagrid("showColumn", "name"); // 设置隐藏列
}
}