From dec9e2a48f0f2a481ebab9cbe35e6a9b6008690c Mon Sep 17 00:00:00 2001 From: Masha_Rudenko Date: Wed, 1 Apr 2026 20:17:57 +0300 Subject: [PATCH 1/2] [add] notes into autoheight and adjust configs pages --- docs/grid/api/grid_adjust_config.md | 3 ++- docs/grid/api/grid_autoheight_config.md | 5 +++++ .../gridcolumn_adjust_property.md | 11 +++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/grid/api/grid_adjust_config.md b/docs/grid/api/grid_adjust_config.md index 4393a704..c127a8e4 100644 --- a/docs/grid/api/grid_adjust_config.md +++ b/docs/grid/api/grid_adjust_config.md @@ -52,13 +52,14 @@ The `adjust` property has a priority over the [`autoWidth`](../../../grid/config The width the columns will be adjusted to also depends on the values of the [`minWidth/maxWidth`](../../../grid/api/api_gridcolumn_properties/) properties if they are set for a column. -**Note** that: +#### Take into account the information below: - 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 - in case of complex HTML data, usage of the `adjust` config may lead to incorrect size calculations - the enabled `adjust` config (including the "header", "footer", "data" modes) adjusts the width of columns taking into account the [`template`](grid/api/api_gridcolumn_properties.md) added to cells. You need to set the **content** attribute of the [`header/footer`](grid/api/api_gridcolumn_properties.md) properties to one of the following modes: "avg" | "sum" | "max" | "min" | "count", otherwise **text** will be calculated +- you can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive **Related API**: [`adjustColumnWidth()`](grid/api/grid_adjustcolumnwidth_method.md) diff --git a/docs/grid/api/grid_autoheight_config.md b/docs/grid/api/grid_autoheight_config.md index 75ff5eb4..d2be1e6a 100644 --- a/docs/grid/api/grid_autoheight_config.md +++ b/docs/grid/api/grid_autoheight_config.md @@ -29,6 +29,10 @@ const grid = new dhx.Grid("grid_container", { **Related sample**: [Grid. Rows auto height](https://snippet.dhtmlx.com/zkcsyazg) +:::info +You can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive. +::: + You can control the autoheight of the header/footer separately with the help of the [](grid/api/grid_headerautoheight_config.md) and [](grid/api/grid_footerautoheight_config.md) configuration options of Grid. For example, you can disable autoheight of the header and the footer, while it is enabled for the whole Grid: ~~~jsx @@ -50,6 +54,7 @@ const grid = new dhx.Grid("grid_container", { - `htmlEnable: true` allows calculating the content of simple HTML templates by excluding HTML markup and calculating internal content - in case of complex HTML data, usage of the `autoHeight` config may lead to incorrect size calculations - note that if you decide to change the font type, its size and offsets, correct calculation of the cell's autoHeight can't be ensured +- you can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive @changelog: added in v7.1 diff --git a/docs/grid/api/gridcolumn_properties/gridcolumn_adjust_property.md b/docs/grid/api/gridcolumn_properties/gridcolumn_adjust_property.md index fe149c77..fb2d2364 100644 --- a/docs/grid/api/gridcolumn_properties/gridcolumn_adjust_property.md +++ b/docs/grid/api/gridcolumn_properties/gridcolumn_adjust_property.md @@ -17,6 +17,10 @@ adjust?: "data" | "header" | "footer" | boolean; @default: false @descr: +:::info +You can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive. +::: + ### Example ~~~jsx @@ -30,8 +34,11 @@ const grid = new dhx.Grid("grid_container", { }); ~~~ -- 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. +#### Take into account the information below: + +- 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 +- you can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive :::note Note that if you change the font type, size, or offsets, the correct calculation of the `adjust` property of a cell may not be guaranteed. From 688f8a60a0226a8f2f764086b3bbef161530c949 Mon Sep 17 00:00:00 2001 From: Masha_Rudenko Date: Wed, 1 Apr 2026 21:15:40 +0300 Subject: [PATCH 2/2] [update] grid adjust and autoheight config pages --- docs/grid/api/grid_adjust_config.md | 21 ++++++++++++---- docs/grid/api/grid_autoheight_config.md | 25 ++++++++++++------- .../gridcolumn_adjust_property.md | 7 +++--- 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/docs/grid/api/grid_adjust_config.md b/docs/grid/api/grid_adjust_config.md index c127a8e4..1f19ac7c 100644 --- a/docs/grid/api/grid_adjust_config.md +++ b/docs/grid/api/grid_adjust_config.md @@ -8,11 +8,23 @@ description: You can explore the adjust config of Grid in the documentation of t @short: Optional. Defines whether the width of columns is automatically adjusted to the width of their content -@signature: {'adjust?: "header" | "footer" | "data" | boolean;'} +#### Usage + +~~~ts +adjust?: "header" | "footer" | "data" | boolean; +~~~ @default: false -@example: +@descr: + +:::info +You can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive. +::: + +#### Example + +~~~jsx const grid = new dhx.Grid("grid_container", { columns: [ // columns config @@ -20,8 +32,7 @@ const grid = new dhx.Grid("grid_container", { adjust: true, data: dataset }); - -@descr: +~~~ **Related sample**: [Grid. Adjust columns by header, data, all](https://snippet.dhtmlx.com/zfrpe22d) @@ -59,7 +70,7 @@ The width the columns will be adjusted to also depends on the values of the [`mi - `htmlEnable: true` allows calculating the content of simple HTML templates by excluding HTML markup and calculating internal content - in case of complex HTML data, usage of the `adjust` config may lead to incorrect size calculations - the enabled `adjust` config (including the "header", "footer", "data" modes) adjusts the width of columns taking into account the [`template`](grid/api/api_gridcolumn_properties.md) added to cells. You need to set the **content** attribute of the [`header/footer`](grid/api/api_gridcolumn_properties.md) properties to one of the following modes: "avg" | "sum" | "max" | "min" | "count", otherwise **text** will be calculated -- you can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive + **Related API**: [`adjustColumnWidth()`](grid/api/grid_adjustcolumnwidth_method.md) diff --git a/docs/grid/api/grid_autoheight_config.md b/docs/grid/api/grid_autoheight_config.md index d2be1e6a..031e402d 100644 --- a/docs/grid/api/grid_autoheight_config.md +++ b/docs/grid/api/grid_autoheight_config.md @@ -12,11 +12,23 @@ This functionality requires PRO version of the DHTMLX Grid (or DHTMLX Suite) pac @short: Optional. Makes long text split into multiple lines based on the width of the column, controls the automatic height adjustment of the header/footer and cells with data -@signature: {'autoHeight?: boolean;'} +#### Usage + +~~~ts +autoHeight?: boolean; +~~~ @default: false -@example: +@descr: + +:::info +You can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive. +::: + +#### Example + +~~~jsx const grid = new dhx.Grid("grid_container", { columns: [ // columns config @@ -24,15 +36,10 @@ const grid = new dhx.Grid("grid_container", { autoHeight: true, data: dataset }); - -@descr: +~~~ **Related sample**: [Grid. Rows auto height](https://snippet.dhtmlx.com/zkcsyazg) -:::info -You can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive. -::: - You can control the autoheight of the header/footer separately with the help of the [](grid/api/grid_headerautoheight_config.md) and [](grid/api/grid_footerautoheight_config.md) configuration options of Grid. For example, you can disable autoheight of the header and the footer, while it is enabled for the whole Grid: ~~~jsx @@ -54,7 +61,7 @@ const grid = new dhx.Grid("grid_container", { - `htmlEnable: true` allows calculating the content of simple HTML templates by excluding HTML markup and calculating internal content - in case of complex HTML data, usage of the `autoHeight` config may lead to incorrect size calculations - note that if you decide to change the font type, its size and offsets, correct calculation of the cell's autoHeight can't be ensured -- you can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive + @changelog: added in v7.1 diff --git a/docs/grid/api/gridcolumn_properties/gridcolumn_adjust_property.md b/docs/grid/api/gridcolumn_properties/gridcolumn_adjust_property.md index fb2d2364..39df7703 100644 --- a/docs/grid/api/gridcolumn_properties/gridcolumn_adjust_property.md +++ b/docs/grid/api/gridcolumn_properties/gridcolumn_adjust_property.md @@ -8,9 +8,9 @@ description: You can explore the adjust config of Grid column in the documentati @short: Optional. Defines whether the width of a column is automatically adjusted to its content -### Usage +#### Usage -~~~jsx +~~~ts adjust?: "data" | "header" | "footer" | boolean; ~~~ @@ -21,7 +21,7 @@ adjust?: "data" | "header" | "footer" | boolean; You can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive. ::: -### Example +#### Example ~~~jsx const grid = new dhx.Grid("grid_container", { @@ -38,7 +38,6 @@ const grid = new dhx.Grid("grid_container", { - 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 -- you can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive :::note Note that if you change the font type, size, or offsets, the correct calculation of the `adjust` property of a cell may not be guaranteed.