customcheckbox.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Custom CheckBox in TreeGrid - jQuery EasyUI Demo</title>
  6. <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
  7. <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
  8. <link rel="stylesheet" type="text/css" href="../demo.css">
  9. <script type="text/javascript" src="../../jquery.min.js"></script>
  10. <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
  11. </head>
  12. <body>
  13. <h2>Custom CheckBox in TreeGrid</h2>
  14. <p>TreeGrid nodes with customized check boxes.</p>
  15. <div style="margin:20px 0;"></div>
  16. <table title="Folder Browser" class="easyui-treegrid" style="width:700px;height:250px"
  17. data-options="
  18. url: 'treegrid_data1.json',
  19. method: 'get',
  20. rownumbers: true,
  21. idField: 'id',
  22. treeField: 'name',
  23. checkbox: function(row){
  24. var names = ['Java','eclipse.exe','eclipse.ini'];
  25. if ($.inArray(row.name, names)>=0){
  26. return true;
  27. }
  28. }
  29. ">
  30. <thead>
  31. <tr>
  32. <th data-options="field:'name'" width="220">Name</th>
  33. <th data-options="field:'size'" width="100" align="right">Size</th>
  34. <th data-options="field:'date'" width="150">Modified Date</th>
  35. </tr>
  36. </thead>
  37. </table>
  38. </body>
  39. </html>