adjust

defines whether the width of columns is automatically adjusted to the width of their content

boolean|string adjust;

Values

  • true|false|"header"|"footer"|"data"
  • Example

    var grid = new dhx.Grid("grid_container", {
        columns: [// columns config],
        adjust: true,      data: dataset
    });


    Default value:

    false

    Related samples

    Details

    The property can be specified to one of the available adjustment modes:


    Note, that:

    • to optimize performance, you should specify htmlEnable: true in the configuration object of the column which contains HTML content;
    • you can also specify htmlEnable:true in the configuration object of Grid;
    • htmlEnable: true allows calculating the content of simple HTML templates by excluding HTML markup and calculating internal content;
    • the adjust option enabled (including the "header", "footer", "data" modes) adjusts the width of columns with account of template added to cells. You need to set the content attribute of the header/footer properties to one of the following modes: "avg" | "sum" | "max" | "min" | "count", otherwise text will be calculated.
    See also
    Change log

    added in v6.4

    Back to top