DHTMLX Docs & Samples Explorer

enableAutoHeight(mode, maxHeight, countFullHeight)

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

enable autoheight of grid

  • mode - true/false
  • maxHeight - maximum height before scrolling appears (no limit by default)
  • countFullHeight - control the usage of maxHeight parameter - when set to true all grid height included in max height calculation, if false then only data part (no header) of grid included in calcualation (false by default)
   //enable auto height mode
   mygrid.enableAutoHeight(true);
 
   //disable auto height mode
   mygrid.enableAutoHeight(false);
 
   //enable auto height mode, set maximum height before scrolling appears, only data part included in max height calculation
   mygrid.enableAutoHeight(true,100);
 
   //enable auto height mode, set maximum height before scrolling appears, all grid height included in max height calculation
   mygrid.enableAutoHeight(true,100,true);

See also: enableAutoWidth, setAwaitedRowHeight