Check documentation for the latest version 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
myTreeGrid.enableAutoWidth(true);
//disable auto width mode
myTreeGrid.enableAutoWidth(true);
//enable auto width mode, set the maximal and minimal allowed width
myTreeGrid.enableAutoWidth(true,600,100);

Back to top