Skip to content

Commit 5b9ed1b

Browse files
committed
[update] complete grid and form docs for v9.0
1 parent 4c559bc commit 5b9ed1b

File tree

6 files changed

+34
-21
lines changed

6 files changed

+34
-21
lines changed

docs/form/features.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ In this section you will study how to send a Form to the server, how to disable
103103
| [Is disabled](../work_with_form/#checking-if-a-form-is-disabled) | Learn how to check whether a Form or its control is disabled ([Example](https://snippet.dhtmlx.com/lthu8p6p)) |
104104
| [Hiding / showing Form](../work_with_form/#hidingshowing-a-form) | Learn how to hide/show a Form |
105105
| [Checking visibility of a Form](../work_with_form/#checking-if-a-form-is-visible) | Learn how to check whether a Form or its control is visible |
106+
| [Using input masks](../work_with_form/#using-input-masks) | Learn how to use pattern and input masks to provide entering of values in a predefined way ([Example 1](https://snippet.dhtmlx.com/51wnauq3), [Example 2](https://snippet.dhtmlx.com/gu1ekt1z)) |
106107
| [Clearing Form](../work_with_form/#clearing-form) | Learn how to clear the values and (or) validation of Form ([Example](https://snippet.dhtmlx.com/a64ih4ih)) |
107108

108109

docs/grid/api/grid_closable_config.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ description: You can explore the closable config of Grid in the documentation of
1212
The described functionality requires PRO version of the DHTMLX Grid (or DHTMLX Suite) package.
1313
:::
1414

15+
:::note
16+
The `closable` property works only with the [`group`](grid/api/grid_group_config.md) panel.
17+
:::
18+
1519
@signature: {'closable?: boolean;'}
1620

1721
@default: true

docs/grid/api/grid_group_config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ You can find the detailed description of the `group` object properties with exam
6262
- if set to *false*, the rows that don't suit the grouping criteria won't be rendered
6363
- `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:
6464
- `map` - (optional) an object for data aggregation in a group, where the keys are field names, and the values can be:
65-
- a tuple `[string, TAggregate]` that specifies the field and the aggregation type ("sum", "count", "min", "max", "avg") from the `dhx.methods` helper
65+
- a tuple `[string, TAggregate]` that specifies the field and the aggregation type ("sum", "count", "min", "max", "avg") from the [`dhx.methods`](helpers/data_calculation_functions.md) helper
6666
- a user-defined aggregation function `((row: IRow[]) => string | number)`
6767
- `summary` - (optional) specifies where the total row is rendered - at the `top` or at the `bottom` of the group
6868
- `order` - (optional) defines the order of grouping by setting the sequence of columns for grouping. The elements of the `order` array can be:

docs/grid/customization.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -145,22 +145,29 @@ You can easily set some styling to the text of footer cells by applying some inl
145145

146146
<script>
147147
const grid = new dhx.Grid("grid_container", {
148-
columns: [
149-
{
150-
width: 100, id: "a", header: [{ text: "#" }], footer: [
151-
{ text: '<div class="custom_footer">Total</div>', colspan: 3 },
152-
{ text: '<div class="custom_footer">Minimal value</div>', colspan: 3 }
153-
]
154-
},
155-
{ width: 100, id: "b", header: [{ text: "Title" }] },
156-
{ width: 200, id: "c", header: [{ text: "Order" }] },
157-
{ width: 200, id: "d", header: [{ text: "Price" }], footer: [
158-
{ content: "sum" }, { content: "min" }
159-
]
160-
}
161-
],
162-
data: dataset
163-
});
148+
columns: [
149+
{
150+
width: 200, id: "country", header: [{ text: "Country" }],
151+
footer: [
152+
{ text: '<div class="custom_footer">Total</div>' },
153+
{ text: '<div class="custom_footer">Minimal value</div>' },
154+
],
155+
htmlEnable: true
156+
},
157+
{
158+
width: 150, id: "population", header: [{ text: "Population" }],
159+
footer: [
160+
{ text: ({ totalPopulation}) => `${totalPopulation}`},
161+
{ text: ({ minimalValue }) => `${minimalValue}`}
162+
],
163+
},
164+
],
165+
summary: {
166+
totalPopulation: ["population", "sum"],
167+
minimalValue: ["population", "min"]
168+
},
169+
data: dataset
170+
});
164171
</script>
165172
~~~
166173

docs/grid/features.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ In this section you will learn how to specify the necessary data formats for a s
7676
| Topic | Description |
7777
| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
7878
| [Configuring data formats](../configuration/#formatting-columns) | Learn how to display values of cells in different formats (percent, currency, date and combination with templates) ([Example](https://snippet.dhtmlx.com/ox37nvdm)) |
79-
| [Date column and support of the Date() object](https://snippet.dhtmlx.com/ylbu791i) | The example shows how [to use the Date() object for specifying dates](../api/grid_data_config/) |
79+
| [Date column and support of the Date() object](https://snippet.dhtmlx.com/ylbu791i) | The example shows how [to use the Date() object for specifying dates](../api/grid_data_config/) |
80+
| [Setting pattern and number masks](../configuration/#formatting-columns) | Learn how to specify input masks for the values of column cells ([Example](https://snippet.dhtmlx.com/45gjhciv)) |
8081

8182

8283

@@ -130,11 +131,11 @@ In this section you will get to know how to render custom statistics in the colu
130131

131132
| Topic | Description |
132133
| -----------------------------------------------------------| -----------------------------------------------|
133-
| [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+
| [Defining the data calculation function](../../helpers/data_calculation_functions/) | Learn how to define the default or create a custom statistical function for data calculation|
134135
| [Calculating a column summary](../configuration/#column-summary) | Learn how to form a summary list for a column ([Example](https://snippet.dhtmlx.com/jhjxjv2l))|
135136
| [Calculating a Grid summary](../configuration/#grid-summary) | Learn how to form a summary list for a Grid |
136137
| [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 text](../configuration/#headerfooter-text) | Learn how to render custom statistics in the text of a column header/footer ([Example](https://snippet.dhtmlx.com/jhjxjv2l))|
138139
| [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|
139140
| [Displaying custom statistics in the spans](../configuration/#spans) | Learn how to render custom statistics in the spans|
140141

docs/grid/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ You can filter grid data by the specified criteria with the help of the `filter(
273273
</tr>
274274
<tr>
275275
<td><b>config</b></td>
276-
<td>(<i>object</i>) optional, an object with the following properties:<ul><li><b>id</b> (<i>string</i>) - optional, the id of the filter</li><li><b>add</b> (<i>boolean</i>) defines whether each next filtering will be applied to the already filtered data (<i>true</i>), or to the initial data (<i>false</i>, default)</li><li><b>permanent</b> (<i>boolean</i>) - optional, <i>true</i> to make the current filter permanent. It will be applied even if the next filtering doesn't have the <b>add:true</b> property in its configuration object. Such a filter can be removed just with the resetFilter() method</li><li><b>smartFilter</b> (<i>boolean</i>) defines whether a filtering rule will be applied after adding and editing items of the collection. <b>Deprecated since v8.2</b> (check <a href="../../migration#81---82">Migration to newer versions</a>) and replaced with the <b>permanent</b> property (see above)</li></ul></td>
276+
<td>(<i>object</i>) optional, an object with the following properties:<ul><li><b>id</b> (<i>string</i>) - optional, the id of the filter</li><li><b>add</b> (<i>boolean</i>) defines whether each next filtering will be applied to the already filtered data (<i>true</i>), or to the initial data (<i>false</i>, default)</li><li><b>permanent</b> (<i>boolean</i>) - optional, <i>true</i> to make the current filter permanent. It will be applied even if the next filtering doesn't have the <b>add:true</b> property in its configuration object. Such a filter can be removed just with the resetFilter() method</li></ul></td>
277277
</tr>
278278
</tbody>
279279
</table>

0 commit comments

Comments
 (0)