Skip to main content

autoWidth

Optional. Makes grid's columns to fit the size of a grid

autoWidth?: boolean;

Default value: false

Example

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

Related sample: Grid. Columns auto width

note

The property is ignored if the adjust property is used.

The width of the columns is calculated on the base of the sizes of the container of the grid and the values of the minWidth/maxWidth properties if they are set for the columns.

note

If the width property is specified in the configuration object of a column, the autoWidth property won't work for this column.

Change log:

added in v6.4