Skip to main content

adjust

Optional. Defines whether the width of a column is automatically adjusted to its content

Usage

adjust?: "data" | "header" | "footer" | boolean; 

Default value: false

Example

const grid = new dhx.Grid("grid_container", { 
columns: [
{ id: "country", header: [{ text: "Country" }], adjust: "header" },
// more columns configuration objects
],
adjust: false,
// more options
});
  • The adjust property has a priority over the autoWidth property if it is specified either for the grid or for the column, and over the width property of the column.
  • The width the columns will be adjusted to also depends on the values of the minWidth/maxWidth properties if they are set for a column.

Related article: Autosize for columns