我使用内联编辑模式和一些编辑规则(例如,编号:{number:true})。
当我保存时,如果验证失败,则错误消息框会正确显示,但错误字段不会以红色突出显示(类ui-state-error)。
默认情况下,jqgrid不应该添加类“ui-state-error”?
grid.jqGrid({
datatype: 'local',
data: colD.rootVar,
gridview: true,
colModel : [
{name: "Team", label:"team", index:"team", width:"150", align:"center", sortable:false},
{name:"Employee", index:"employee", width:"150", align:"center", sortable:false},
{name:"col_01", index:"1", width:"50", align:"center", sortable:false, editable:true, editrules:{required: true, number:true} },
{name:"col_02", index:"2", width:"50", align:"center", sortable:false, editable:true } ],
pager: jQuery('#pager'),
rowNum: 20,
rowList: [5, 10, 20, 50],
height: "auto",
viewrecords: true,
caption: "Planning Management ITEC-PRD"
});
grid.jqGrid('navGrid',"#pager",{edit:false, add:false, del:false});
grid.jqGrid('inlineNav',"#pager",{edit:true, add:false, del:false});
}
感谢您的帮助