Advertisement
Guest User

Untitled

a guest
Jan 19th, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div style="width:100%;">
  2.     <div style="margin:10px 30px; text-align:left;">
  3.         <a class="button" href="javascript: void(0);" onclick="addCategory();"> Add Category </a>
  4.        
  5.     </div>
  6.  
  7.     <div id="catgridbox" style="margin:15px auto; background-color:white; overflow:hidden; white-space:normal; width:40%; align:left;">
  8.     <div id="allowancegridbox" style="margin:15px auto; background-color:white; overflow:hidden; white-space:normal; width:40%; align:right;">
  9.     </div> 
  10. </div>
  11.  
  12. <script>
  13. //Departments grid
  14.  
  15. categoriesGrid = new dhtmlXGridObject({
  16.     parent: 'catgridbox',
  17.     image_path: "/libraries/dhtmlx/grid/codebase/imgs/",
  18.     skin: "dhx_skyblue",
  19.     editable: true,
  20.     columns: [ {
  21.         label: "Category Name",
  22.         width: 250,
  23.         type: "ro",
  24.         sort: "str",
  25.         align: "left"
  26.     }]
  27. });
  28.  
  29. allowancesGrid = new dhtmlXGridObject({
  30.     parent: 'allowancegridbox',
  31.     image_path: "/libraries/dhtmlx/grid/codebase/imgs/",
  32.     skin: "dhx_skyblue",
  33.     editable: true,
  34.     columns: [ {
  35.         label: "Category Name",
  36.         width: 250,
  37.         type: "ro",
  38.         sort: "str",
  39.         align: "left"
  40.     }]
  41. });
  42.  
  43. categoriesGrid.enableMultiline(true);
  44. categoriesGrid.attachHeader("#text_filter");
  45. categoriesGrid.enableAutoHeight(true,'500');
  46.  
  47. categoriesGrid.attachEvent('onXLE', function() {
  48.     $('#bt_show').val('Show');
  49. });
  50.  
  51. categoriesGrid.setEditable(true);
  52. categoriesGrid.attachEvent("onEditCell", function(stage,rId,cInd,nValue,oValue){ updateDepartment(stage,rId, cInd, nValue, oValue); return true;});
  53.  
  54. // allowancesGrid.enableMultiline(true);
  55. // allowancesGrid.attachHeader("#text_filter");
  56. // allowancesGrid.enableAutoHeight(true,'500');
  57.  
  58. // allowancesGrid.attachEvent('onXLE', function() {
  59.     // $('#bt_show').val('Show');
  60. // });
  61.  
  62. // allowancesGrid.setEditable(true);
  63. // allowancesGrid.attachEvent("onEditCell", function(stage,rId,cInd,nValue,oValue){ updateDepartment(stage,rId, cInd, nValue, oValue); return true;});
  64.  
  65. loadCategories();
  66. $('.button').button();
  67. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement