api參考:
http://blog.csdn.net/hurryjiang/article/details/7551477
官網demo:
http://www.trirand.com/blog/jqgrid/jqgrid.html
對單元格進入編輯狀態:
1 在colModel中加入三個參數:
editable : true,
edittype : "checkbox",
editoptions : {
value : "運行:停止"
}
2 監聽select事件(onSelectRow),事件觸發后,執行下面的代碼:
//把當前選中的行,打開編輯狀態(id:rowid,;true:啟動鍵盤事件-->>enter:確認修改。esc:不做修改,直接返回)
chart.gridObj.editRow(id, true);
jqgrid中的編輯,還原以及保存方法如下:
//編輯
//$("#test").editRow(id, true);
//還原
//$("#test").restoreRow(id);
//保存
//$("#test").saveRow(id);
//});
jqgrid的編輯狀態,可參考:
http://blog.csdn.net/mengtianyalll/article/details/13510311
http://blog.csdn.net/seng3018/article/details/7224476