Skip to content

Commit 688f8a6

Browse files
committed
[update] grid adjust and autoheight config pages
1 parent dec9e2a commit 688f8a6

3 files changed

Lines changed: 35 additions & 18 deletions

File tree

docs/grid/api/grid_adjust_config.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,31 @@ description: You can explore the adjust config of Grid in the documentation of t
88

99
@short: Optional. Defines whether the width of columns is automatically adjusted to the width of their content
1010

11-
@signature: {'adjust?: "header" | "footer" | "data" | boolean;'}
11+
#### Usage
12+
13+
~~~ts
14+
adjust?: "header" | "footer" | "data" | boolean;
15+
~~~
1216

1317
@default: false
1418

15-
@example:
19+
@descr:
20+
21+
:::info
22+
You can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive.
23+
:::
24+
25+
#### Example
26+
27+
~~~jsx
1628
const grid = new dhx.Grid("grid_container", {
1729
columns: [
1830
// columns config
1931
],
2032
adjust: true,
2133
data: dataset
2234
});
23-
24-
@descr:
35+
~~~
2536

2637
**Related sample**: [Grid. Adjust columns by header, data, all](https://snippet.dhtmlx.com/zfrpe22d)
2738

@@ -59,7 +70,7 @@ The width the columns will be adjusted to also depends on the values of the [`mi
5970
- `htmlEnable: true` allows calculating the content of simple HTML templates by excluding HTML markup and calculating internal content
6071
- in case of complex HTML data, usage of the `adjust` config may lead to incorrect size calculations
6172
- 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
73+
6374

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

docs/grid/api/grid_autoheight_config.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,34 @@ This functionality requires PRO version of the DHTMLX Grid (or DHTMLX Suite) pac
1212

1313
@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
1414

15-
@signature: {'autoHeight?: boolean;'}
15+
#### Usage
16+
17+
~~~ts
18+
autoHeight?: boolean;
19+
~~~
1620

1721
@default: false
1822

19-
@example:
23+
@descr:
24+
25+
:::info
26+
You can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive.
27+
:::
28+
29+
#### Example
30+
31+
~~~jsx
2032
const grid = new dhx.Grid("grid_container", {
2133
columns: [
2234
// columns config
2335
],
2436
autoHeight: true,
2537
data: dataset
2638
});
27-
28-
@descr:
39+
~~~
2940

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

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

3845
~~~jsx
@@ -54,7 +61,7 @@ const grid = new dhx.Grid("grid_container", {
5461
- `htmlEnable: true` allows calculating the content of simple HTML templates by excluding HTML markup and calculating internal content
5562
- in case of complex HTML data, usage of the `autoHeight` config may lead to incorrect size calculations
5663
- 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
64+
5865

5966
@changelog: added in v7.1
6067

docs/grid/api/gridcolumn_properties/gridcolumn_adjust_property.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ description: You can explore the adjust config of Grid column in the documentati
88

99
@short: Optional. Defines whether the width of a column is automatically adjusted to its content
1010

11-
### Usage
11+
#### Usage
1212

13-
~~~jsx
13+
~~~ts
1414
adjust?: "data" | "header" | "footer" | boolean;
1515
~~~
1616

@@ -21,7 +21,7 @@ adjust?: "data" | "header" | "footer" | boolean;
2121
You can't enable `autoHeight` and `adjust` properties at the same time, as they are mutually exclusive.
2222
:::
2323

24-
### Example
24+
#### Example
2525

2626
~~~jsx
2727
const grid = new dhx.Grid("grid_container", {
@@ -38,7 +38,6 @@ const grid = new dhx.Grid("grid_container", {
3838

3939
- 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
4040
- 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
4241

4342
:::note
4443
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)