Skip to content

Commit 9271fd0

Browse files
committed
[update] minor corrections in row expander guide
1 parent 00e79bb commit 9271fd0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/grid/configuration.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,7 +1620,7 @@ const grid = new dhx.Grid("grid_container", {
16201620

16211621
## Row expander
16221622

1623-
The row expander functionality allows using nested content in Grid sub-rows. You can add a Grid or any other Suite widget, as well as some HTML content into a sub-row. The number of nesting levels is unlimited.
1623+
The row expander functionality allows using nested content in Grid sub-rows. You can add a Grid or any other Suite widget, as well as some HTML content into a sub-row. The number of Grid nesting levels is unlimited.
16241624

16251625
:::tip Pro version only
16261626
This functionality requires PRO version of the DHTMLX Grid (or DHTMLX Suite) package.
@@ -1686,8 +1686,8 @@ This property can be used either as a callback function or as an object:
16861686
The **subRowConfig** object may contain the following properties:
16871687

16881688
- `expanded` - (*boolean*) defines whether a sub-row is expanded by default, *false* by default
1689-
- `preserve` - (*boolean*) saves the state of sub-rows while expanding/collapsing, disappearing from the visible area, data updating, *false* by default
1690-
- `toggleIcon` - (*boolean*) enables the icon for expanding/collapsing, *true* by default
1689+
- `preserve` - (*boolean*) saves the state of sub-rows when they are expanded/collapsed, hidden from the visible area, the data is updated, *false* by default
1690+
- `toggleIcon` - (*boolean*) enables the icon for sub-rows expanding/collapsing, *true* by default
16911691
- `height` - (*number*) the height of a sub-row in pixels, *200* by default
16921692
- `padding` - (*string|number*) the inner padding of a sub-row, *8* by default
16931693
- `css` - (*string*) user-defined CSS classes for a sub-row
@@ -1737,9 +1737,9 @@ const grid = new dhx.Grid("grid_container", {
17371737
});
17381738
~~~
17391739

1740-
In the above example the sub-rows are dynamically configured depending on the value in the column with the "temperature" id. If the temperature value is more than 30, a sub-row will be expanded and gets the CSS class "hot-zone" (or "cool-zone", if the temperature value is less than 30). The height of an expanded sub-row cell will be 200.
1740+
In the above example the sub-rows are dynamically configured depending on the value in the column with the "temperature" id. If the temperature value is more than 30, a sub-row will be expanded and gets the CSS "hot-zone" class (or "cool-zone", if the temperature value is less than 30). The height of an expanded sub-row cell will be 200px.
17411741

1742-
In the following example the [`subRowConfig`](grid/api/grid_subrowconfig_config.md) config set as a callback function defines that the rows that have the "Critical" status in the column with the "health_status" id will be expanded on initialization of the Grid and specifies the height of a sub-row cell:
1742+
In the following example the [`subRowConfig`](grid/api/grid_subrowconfig_config.md) config set as a callback function defines that the rows that have the "Critical" status in the column with the "health_status" id will be expanded on initialization of the Grid. The height of an expanded sub-row cell will be 250px.
17431743

17441744
~~~jsx {5-8}
17451745
const grid = new dhx.Grid("grid_container", {
@@ -1766,9 +1766,9 @@ const grid = new dhx.Grid("grid_container", {
17661766

17671767
**Related sample:** [Grid. Row expander. Subgrid with rows expanded by criteria](https://snippet.dhtmlx.com/pbubj175)
17681768

1769-
### Saving the state of nested components or data in sub-rows
1769+
### Saving state of nested components or data in sub-rows
17701770

1771-
You can save the state of the nested components or the data of sub-rows while updating data, scrolling or collapsing sub-rows, using the `preserve` property of the [`subRowConfig`](grid/api/grid_subrowconfig_config.md) configuration option of Grid. By default, sub-rows are destroyed when they are hidden (e.g. if a row leaves the visible area during scrolling) or collapsed, which leads to resetting of any changes made in the inner components.
1771+
You can save the state of the nested components or the data of sub-rows while updating data, scrolling or collapsing sub-rows by using the `preserve` property of the [`subRowConfig`](grid/api/grid_subrowconfig_config.md) configuration option of Grid. By default, sub-rows are destroyed when they are hidden (e.g. if a row leaves the visible area during scrolling) or collapsed, which leads to resetting of any changes made in the inner components.
17721772

17731773
When the `preserve: true` setting is specified, sub-rows save their content even after being destroyed or hidden. It means that any change (such as sorting, data input or state change) is saved and the sub-row is restored in the same state when displayed again.
17741774

@@ -1843,7 +1843,7 @@ In the above example the `load()` method of [DataCollection](/data_collection/)
18431843

18441844
#### Grid event handlers
18451845

1846-
If a sub-row initializes a nested component (any Suite component), the sub-component's events can be set in the `subRow` callback function. It allows specifying event handlers directly for the nested component:
1846+
If a sub-row initializes a nested component (any Suite component), the sub-component's events can be set in the [`subRow`](grid/api/grid_subrow_config.md) callback function. It allows specifying event handlers directly for the nested component:
18471847
18481848
~~~jsx {16-18}
18491849
const grid = new dhx.Grid("grid_container", {

0 commit comments

Comments
 (0)