DHTMLX Docs & Samples Explorer

makePivot(cont,details)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxgrid_pivot.js

show pivot table based on grid

  • cont - html container in which pivot rendered (optional, by default pivot will be rendered over existing grid)
  • details - collection of settings:
    • details.column_list - list of columns used in pivot selects (For example: {column_list:['Title','Author','Money']} ),
    • details.readonly - true\false - created pivot with fixed configuration (For example: {readonly:true} ),
    • details.action, details.value, details.x, details.y - default values for 4 pivot's selects (For example: {action:3,value:1,x:3,y:2} )
   //minimal parameters set
   mygrid.makePivot();
   //make pivot in the external html container
   mygrid.makePivot('pivot_container');
   //limited field set
   mygrid.makePivot('pivot_container',{column_list:['Title','Author','Money']})
   //predefined set
   mygrid.makePivot('pivot_container',{action:3,value:1,x:3,y:2})
   //predefined set + readonly
   mygrid.makePivot('pivot_container',{readonly:true,action:3,value:1,x:3,y:2})

See also: hidePivot