jqgrid--api,官網demo,編輯


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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM