DHTMLX Docs & Samples Explorer

enableAutoWidth(mode, max_limit, min_limit)

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

changes grid's container size on the fly to fit total width of grid columns

  • mode - truse/false - enable / disable
  • max_limit - max allowed width, not limited by default
  • min_limit - min allowed width, not limited by default
   //enable auto width mode
   mygrid.enableAutoWidth(true);
   //disable auto width mode
   mygrid.enableAutoWidth(false);
   //enable auto width mode, set maximal and minimal allowed width
   mygrid.enableAutoWidth(true,600,100);

See also: enableAutoHeight