编辑jqgrid中的数据时出现问题,jquery高亮显示,可以尝试以下解决方法:
// 在编辑前事件中设置编辑行的高亮显示
beforeEditRow: function(rowid, rowdata, options) {
// 高亮显示编辑行
$("#" + rowid).addClass("highlight");
},
// 在编辑完成事件中移除编辑行的高亮显示
afterSaveCell: function(rowid, cellname, value, iRow, iCol) {
// 移除编辑行的高亮显示
$("#" + rowid).removeClass("highlight");
},
.highlight {
background-color: yellow;
}
这样,在编辑jqgrid中的数据时,编辑行会被高亮显示为黄色背景,从而提醒用户当前正在编辑的行。
下一篇:编辑Json程序