Check documentation for the latest version 6.0 of dhtmlxSuite enableAutoWidth DHTMLX Docs

enableAutoWidth

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

void enableAutoWidth(boolean mode,number max_limit,number min_limit);

Parameters

modebooleantrue/false - enable / disable
max_limitnumbermax allowed width, not limited by default
min_limitnumbermin allowed width, not limited by default

Example

//enable auto width mode
myGrid.enableAutoWidth(true);
//disable auto width mode
myGrid.enableAutoWidth(false);
//enable auto width mode, set the maximal and minimal allowed width
myGrid.enableAutoWidth(true,600,100);

Back to top