This feature is built into jqGrid.
setup your grid function as follows.
$('#myGrid').jqGrid({
...
colNames: ['Manager', 'Name', 'HiddenSalary'],
colModel: [
{ name: 'Manager', editable: true },
{ name: 'Price', editable: true },
{ name: 'HiddenSalary', hidden: true , editable: true,
editrules: {edithidden:true}
}
],
...
};
There are other editrules that can be applied but this basic setup would hide the manager's salary in the grid view but would allow editing when the edit form was displayed.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…