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
|[Configuring header/footer](../api/api_gridcolumn_properties/)| Learn how to configure a Grid header/footer ([Example](https://snippet.dhtmlx.com/9jl55ep7)) |
90
90
|[Setting the height for header and footer](../configuration/#headerfooter-height)| Learn how to set the height for rows in the header and footer of Grid ([Example](https://snippet.dhtmlx.com/wjcjl80i)) |
91
+
|[Setting the text for header and footer](../configuration/#headerfooter-text)| Learn how to set the text for rows in the header and footer of Grid ([Example](https://snippet.dhtmlx.com/9jl55ep7)) |
91
92
|[Styling header cells](../customization/#styling-header-cells)| Learn how to set styling to the text of header cells ([Example](https://snippet.dhtmlx.com/7o4elf48)) |
92
93
|[Styling footer cells](../customization/#styling-footer-cells)| Learn how to set styling to the text of footer cells ([Example](https://snippet.dhtmlx.com/d254hcvp)) |
93
94
94
95
95
96
### How to configure tooltips
96
97
97
-
In this section you will know how to add tooltips of the desired appearance with the necessary information, or hide them if needed.
98
+
In this section you will get to know how to add tooltips of the desired appearance with the necessary information, or hide them if needed.
@@ -123,6 +124,21 @@ In this section you will know how to configure the drag-n-drop functionality for
123
124
|[Drag-n-drop of multiple rows](grid/configuration.md#drag-n-drop-of-multiple-rows)| Learn how to allow end users to drag-n-drop several rows at once |
124
125
|[Copying of rows during drag-n-drop](../api/grid_dragcopy_config/)| Learn how to copy a row to a target during drag-n-drop ([Example](https://snippet.dhtmlx.com/23slivyz)) |
125
126
127
+
## How to render custom statistics in the column header/footer and in the spans
128
+
129
+
In this section you will get to know how to render custom statistics in the column header/footer and in the spans.
|[Defining the data calculation function](../helpers/data_calculation_functions/)| Learn how to define the default or create a custom statistical function for data calculation|
134
+
|[Calculating a column summary](../configuration/#column-summary)| Learn how to form a summary list for a column ([Example](https://snippet.dhtmlx.com/jhjxjv2l))|
135
+
|[Calculating a Grid summary](../configuration/#grid-summary)| Learn how to form a summary list for a Grid |
136
+
|[Getting the summary object](../configuration/#getting-the-summary-object)| Learn how to get the summary object |
137
+
|[Displaying custom statistics in the column header/footer text](../configuration/#headerfooter-text)| Learn how to render custom statistics in the text of a column header/footer|
138
+
|[Displaying custom statistics in the column header/footer tooltip](../configuration/#column-headerfooter-tooltip)| Learn how to render custom statistics in the tooltip of a column header/footer|
139
+
|[Displaying custom statistics in the spans](../configuration/#spans)| Learn how to render custom statistics in the spans|
140
+
141
+
126
142
## How to configure sizes of Grid and its cells
127
143
128
144
In this section you can learn how to configure the size of Grid and its cells.
@@ -158,7 +174,7 @@ In this section you can learn how to configure the style of Grid and its cells.
158
174
159
175
## How to work with columns and rows
160
176
161
-
In this section you will know how to add and remove columns and rows, how to hide and show them, how to configure their sizes and align content inside the columns.
177
+
In this section you will learn how to add and remove columns and rows, how to hide and show them, how to configure their sizes and align content inside the columns.
162
178
163
179
### Adding/removing columns and rows
164
180
@@ -226,6 +242,18 @@ In this section you will find the ways of filtering data in Grid.
226
242
|[Customizing filters in the header/footer](../configuration/#customizing-headerfooter-filters)| Learn how to add a custom function with your own logic for filtering data in a Grid column ([Example](https://snippet.dhtmlx.com/gcidkxjg)) |
227
243
|[Getting the header filter](../api/grid_getheaderfilter_method/)| Learn how to get and use an object of the header filter ([Example](https://snippet.dhtmlx.com/n8srjle3)) |
228
244
245
+
### How to group data
246
+
247
+
In this section you will get to know how to group row data in Grid.
|[Enabling data grouping](../usage/#enabling-data-grouping)| Learn how to enable row data grouping ([Example](https://snippet.dhtmlx.com/dvqy4ewe)) |
252
+
|[Configuring data grouping](../usage/#configuring-data-grouping)| Learn how to configure row data grouping ([Example](https://snippet.dhtmlx.com/z3iw2p3k)) |
253
+
|[Making group panel elements closable](../usage/#making-group-panel-elements-closable)| Learn how to make elements of the group panel closable ([Example](https://snippet.dhtmlx.com/z3iw2p3k)) |
254
+
|[Using DataCollection API for data grouping](../usage/#using-datacollection-api-for-data-grouping)| Learn how to group Grid data with DataCollection API ([Example](https://snippet.dhtmlx.com/vo3pgkgh)) |
255
+
256
+
229
257
## How to work with selection
230
258
231
259
In this section you will find the ways of working with selection functionality.
@@ -263,11 +291,19 @@ In this section you will learn how to scroll Grid to the necessary position.
263
291
264
292
## How to export Grid
265
293
266
-
In this section you will know how to export Grid to different formats.
294
+
In this section you will get to know how to export Grid to different formats.
|[Exporting Grid to XLSX, CSV, PNG or PDF format](../usage/#exporting-data)| Learn how to export Grid to the necessary format ([Example 1](https://snippet.dhtmlx.com/58oqij47), [Example 2](https://snippet.dhtmlx.com/ti9l91mn)) |
299
+
300
+
## How to localize Grid
301
+
302
+
In this section you will get to know how to localize the interface of Grid.
|[Exporting Grid to XLSX, CSV, PNG. or PDF format](../usage/#exporting-data)| Learn how to export Grid to the necessary format ([Example 1](https://snippet.dhtmlx.com/58oqij47), [Example 2](https://snippet.dhtmlx.com/ti9l91mn))|
306
+
|[Localizing Grid](../localization/)| Learn how to apply different languages to the interface of dhtmlxGrid|
Copy file name to clipboardExpand all lines: docs/grid/usage.md
+9-15Lines changed: 9 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -536,7 +536,7 @@ With the Grid `groupable` property enabled you can:
536
536
- or by clicking a group element on the group panel
537
537
- edit the nesting level of grouping by modifying the grouping order by either moving elements to the group panel or removing elements from the group panel
-`hideableColumns` - (optional) specifies whether columns will be hidden on a group creation, *true* by default. If set to *false*, columns used for grouping will remain visible
597
597
@@ -610,7 +610,7 @@ const grid = new dhx.Grid("grid_container", {
-`showMissed` - (optional) controls visibility of the elements that don't suit the grouping criteria (e.g. data without values), *true* by default. The following settings are available:
616
616
- if set to *true*, the rows that don't have values for grouping are rendered row by row after all the data
@@ -634,7 +634,7 @@ const grid = new dhx.Grid("grid_container", {
634
634
});
635
635
~~~
636
636
637
-
**Related sample:**[Grid. Grouping missing data (PRO)](https://snippet.dhtmlx.com/0geopa0v)
-`fields` - (optional) predefines an extended configuration for data grouping by certain columns, by setting the rules of aggregation and rendering of the results. The attributes of the `fields` object correspond to the ids of columns for which the aggregation rules and the order of results are being configured. The configuration of a column is defined by the `IGroupOrder` object that has the following properties:
640
640
-`map` - (optional) an object for data aggregation in a group, where the keys are field names, and the values can be:
@@ -688,7 +688,7 @@ b) the total rows under the grouped values set by the `summary` property
688
688
- a user-defined aggregation function `((row: IRow[]) => string | number)`
689
689
-`summary` - (optional) specifies where the total row is rendered - at the `top` or at the `bottom` of the group
Below you'll find the examples of configuring Grid via the `order` property:
694
694
@@ -805,7 +805,7 @@ const grid = new dhx.Grid("grid_container", {
805
805
806
806
-`column` - (optional) defines the configuration of a column that renders values by the grouped data. This column will be used as a main one for structuring and rendering data grouped by value
You can also use the [`closable`](grid/api/api_gridcolumn_properties.md) configuration property of a column. It allows making a particular group panel element closable or permanently enabled:
934
928
@@ -1039,7 +1033,7 @@ grid.data.group([{
1039
1033
}]);
1040
1034
~~~
1041
1035
1042
-
**Related sample:** [Grouping and totals in the summary row via data collection (PRO)](https://snippet.dhtmlx.com/ihd6gtpj)
1036
+
**Related sample:** [Grouping and totals in the summary row via data collection](https://snippet.dhtmlx.com/ihd6gtpj)
1043
1037
1044
1038
- grouping with the use of the `showMissed` property
1045
1039
@@ -1062,7 +1056,7 @@ grid.data.group(["city"], {
1062
1056
});
1063
1057
~~~
1064
1058
1065
-
**Related sample:** [Grid. Grouping missing data (PRO)](https://snippet.dhtmlx.com/0geopa0v)
You can specify a custom function for calculating data. For example, you can use the `methods` helper function for adding custom calculations to [get a summary of counted values](grid/configuration.md#getting-the-summary-object). Thus, you can provide a functor that will calculate a doubled sum of values for a particular column:
23
+
You can specify a custom function for calculating data. For example, you can use the `methods` helper function for adding custom calculations to [get a summary of counted values](grid/configuration.md#getting-the-summary-object).
24
24
25
-
~~~jsx {1-3,11,17-18}
25
+
In the example below a custom functor `doubleSum()` that calculates a doubled sum of values for a particular column is defined. The result of its calculations is used to render statistics in the footer of the "population" column.
26
+
27
+
~~~jsx {1-3,10-11}
26
28
dhx.methods.doubleSum= (rows, field) => {
27
29
returnrows.reduce((sum, row) => sum + row[field] *2, 0);
0 commit comments