Skip to content

Commit 1924c25

Browse files
authored
Merge pull request #99 from DHTMLX/grid-adjust-autoheight-use-4960
[add] notes into autoheight and adjust configs pages
2 parents 854be89 + dec9e2a commit 1924c25

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

docs/grid/api/grid_adjust_config.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@ The `adjust` property has a priority over the [`autoWidth`](../../../grid/config
5252

5353
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.
5454

55-
**Note** that:
55+
#### Take into account the information below:
5656

5757
- to optimize performance, you should specify `htmlEnable: true` in the configuration object of the column which contains HTML content
5858
- you can also specify `htmlEnable:true` in the configuration object of Grid
5959
- `htmlEnable: true` allows calculating the content of simple HTML templates by excluding HTML markup and calculating internal content
6060
- in case of complex HTML data, usage of the `adjust` config may lead to incorrect size calculations
6161
- 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
62+
- you can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive
6263

6364
**Related API**: [`adjustColumnWidth()`](grid/api/grid_adjustcolumnwidth_method.md)
6465

docs/grid/api/grid_autoheight_config.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ const grid = new dhx.Grid("grid_container", {
2929

3030
**Related sample**: [Grid. Rows auto height](https://snippet.dhtmlx.com/zkcsyazg)
3131

32+
:::info
33+
You can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive.
34+
:::
35+
3236
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:
3337

3438
~~~jsx
@@ -50,6 +54,7 @@ const grid = new dhx.Grid("grid_container", {
5054
- `htmlEnable: true` allows calculating the content of simple HTML templates by excluding HTML markup and calculating internal content
5155
- in case of complex HTML data, usage of the `autoHeight` config may lead to incorrect size calculations
5256
- 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
57+
- you can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive
5358

5459
@changelog: added in v7.1
5560

docs/grid/api/gridcolumn_properties/gridcolumn_adjust_property.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ adjust?: "data" | "header" | "footer" | boolean;
1717
@default: false
1818

1919
@descr:
20+
:::info
21+
You can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive.
22+
:::
23+
2024
### Example
2125

2226
~~~jsx
@@ -30,8 +34,11 @@ const grid = new dhx.Grid("grid_container", {
3034
});
3135
~~~
3236

33-
- 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.
34-
- 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.
37+
#### Take into account the information below:
38+
39+
- 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
40+
- 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
41+
- you can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive
3542

3643
:::note
3744
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.

0 commit comments

Comments
 (0)