You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/grid/configuration.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1620,7 +1620,7 @@ const grid = new dhx.Grid("grid_container", {
1620
1620
1621
1621
## Row expander
1622
1622
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 ofGrid nesting levels is unlimited.
1624
1624
1625
1625
:::tip Pro version only
1626
1626
This functionality requires PRO version of the DHTMLXGrid (or DHTMLX Suite) package.
@@ -1686,8 +1686,8 @@ This property can be used either as a callback function or as an object:
1686
1686
The **subRowConfig** object may contain the following properties:
1687
1687
1688
1688
- `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
1691
1691
- `height` - (*number*) the height of a sub-row in pixels, *200* by default
1692
1692
- `padding` - (*string|number*) the inner padding of a sub-row, *8* by default
1693
1693
- `css` - (*string*) user-defined CSS classes for a sub-row
@@ -1737,9 +1737,9 @@ const grid = new dhx.Grid("grid_container", {
1737
1737
});
1738
1738
~~~
1739
1739
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.
1741
1741
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.
1743
1743
1744
1744
~~~jsx {5-8}
1745
1745
constgrid=newdhx.Grid("grid_container", {
@@ -1766,9 +1766,9 @@ const grid = new dhx.Grid("grid_container", {
1766
1766
1767
1767
**Related sample:** [Grid. Rowexpander. Subgridwith rows expanded by criteria](https://snippet.dhtmlx.com/pbubj175)
1768
1768
1769
-
### Saving the state of nested components or data in sub-rows
1769
+
### Saving state of nested components or data in sub-rows
1770
1770
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 ofGrid. 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 ofGrid. 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.
1772
1772
1773
1773
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.
1774
1774
@@ -1843,7 +1843,7 @@ In the above example the `load()` method of [DataCollection](/data_collection/)
1843
1843
1844
1844
#### Grid event handlers
1845
1845
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:
0 commit comments