小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

Jqgrid+spring mvc使用心得

 quasiceo 2018-09-09

前言:項目需要用到表格插件,本來覺得jquery datatable樣式不錯,后臺發(fā)現(xiàn)沒有繼承checkbox等問題,最終轉(zhuǎn)而使用jqgrid。

項目語言及架構(gòu):java spring mvc

1、jqgrid的創(chuàng)建:

jar包地址:http://pan.baidu.com/s/1nutFNvz 密碼:i7ka

2、html代碼

  1. <div id="jqgrid-wrapper">
  2. <table id="mygrid" class="table table-striped table-hover">
  3. <tr>
  4. <td></td>
  5. </tr>
  6. </table>
  7. <div id="jqgrid-pager"></div>
  8. </div>

3、js代碼

3.1、初始化

  1. $('#mygrid').jqGrid({
  2. url : '${pageContext.request.contextPath}/cus/xxx.do',
  3. postData:{'menuId':$('#menuId').val(),'type':$('#type').val()},
  4. mtype : "POST",
  5. contentType : "application/json",
  6. datatype : "json",
  7. colModel : [ {
  8. label : '選擇',
  9. name : 'id',
  10. key : true,
  11. hidden : true
  12. }, {
  13. label : '名稱',
  14. name : 'name'
  15. }, {
  16. label : '描述',
  17. name : 'remark'
  18. }, {
  19. label : '創(chuàng)建時間',
  20. name : 'createTime'
  21. } ],
  22. height : '100%',
  23. pager : 'jqgrid-pager',
  24. page : "${page}", //初始化查詢頁數(shù)
  25. rowNum : "${rows}",
  26. rowList : [ 10, 20, 30 ],
  27. sortname : 'createTime',
  28. sortable : true,
  29. sortorder : 'desc',
  30. jsonReader : {
  31. root : "formList", // json中代表實際模型數(shù)據(jù)的入口

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多