Skip to content

Commit 2c4a4a9

Browse files
authored
Merge pull request #88 from DHTMLX/9.3
[update] correct and complete docs for v9.3
2 parents 383f321 + 1613463 commit 2c4a4a9

11 files changed

+93
-24
lines changed
-455 Bytes
Loading
9 Bytes
Loading
31.4 KB
Loading
-31 KB
Binary file not shown.
-220 Bytes
Loading

docs/grid/api/grid_footerposition_config.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,31 @@ This functionality requires PRO version of the DHTMLX Grid (or DHTMLX Suite) pac
1919
@example:
2020
const grid = new dhx.Grid("grid_container", {
2121
columns: [
22-
// columns config
22+
{
23+
id: "productId",
24+
header: [{ text: "Product Id" }],
25+
summary: "count",
26+
footer: [{ text: summary => `Total: ${summary.count}` }],
27+
},
28+
{
29+
id: "category",
30+
header: [{ text: "Category" }],
31+
},
32+
{
33+
id: "price",
34+
type: "number",
35+
numberMask: { prefix: "$" },
36+
header: [{ text: "Price" }],
37+
summary: "avg",
38+
footer: [{ text: summary => `Avg: ${summary.avg}` }],
39+
},
40+
{
41+
id: "stock",
42+
type: "number",
43+
header: [{ text: "Stock" }],
44+
summary: "sum",
45+
footer: [{ text: summary => `Total: ${summary.sum}` }],
46+
},
2347
],
2448
data: dataset,
2549
footerPosition: "bottom", // "relative" by default

docs/grid/api/grid_getheaderfilter_method.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ description: You can explore the getHeaderFilter method of Grid in the documenta
1616
@returns:
1717
An object with a set of methods which let you work with the header filter of the specified column. The methods are:
1818

19-
- [blur()](grid/api/headerfilter/blur_method.md) - removes focus from the filter
20-
- [clear()](grid/api/headerfilter/clear_method.md) - clears the value set in the filter
21-
- [focus()](grid/api/headerfilter/focus_method.md) - sets focus on the filter
22-
- [getFilter()](grid/api/headerfilter/getfilter_method.md) - returns either an HTML object or an object with Combobox configuration
23-
- [setValue()](grid/api/headerfilter/setvalue_method.md) - sets a value by which a column will be filtered
19+
- [`blur()`](grid/api/headerfilter/blur_method.md) - removes focus from the filter
20+
- [`clear()`](grid/api/headerfilter/clear_method.md) - clears the value set in the filter
21+
- [`focus()`](grid/api/headerfilter/focus_method.md) - sets focus on the filter
22+
- [`getFilter()`](grid/api/headerfilter/getfilter_method.md) - returns either an HTML object, or an object with Combobox/Calendar configuration
23+
- [`setValue()`](grid/api/headerfilter/setvalue_method.md) - sets the filter value
2424

2525
@example:
2626
const countryFilter = grid.getHeaderFilter("country");

docs/grid/api/headerfilter/getfilter_method.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,24 @@ description: You can explore the getFilter method of the header filter of Grid i
66

77
# getFilter()
88

9-
@short: returns either an HTML object or an object with Combobox configuration
9+
@short: returns either an HTML object, or an object with Combobox/Calendar configuration
1010

11-
@signature: {'getFilter(): HTML object | Combobox;'}
11+
@signature: {'getFilter(): VNode | Combobox | Calendar;'}
1212

1313
@returns:
14-
Either an HTML object or an object with Combobox configuration
14+
Either an HTML object, or an object with Combobox/Calendar configuration
1515

1616
@example:
1717
const filter1 = grid.getHeaderFilter("country").getFilter();
1818
console.log(filter1);
1919
// -> returns Combobox
20-
//  {config: {…}, _uid: 'u1670500020936', events: o, data: d, popup: f, …}
21-
20+
// { config: {...}, _uid: 'u1670500020936', events: o, data: d, popup: f, ... }
2221

2322
const filter2 = grid.getHeaderFilter("netChange").getFilter();
2423
console.log(filter2);
2524
// -> returns an HTML object
26-
// {type: 1, attrs: {…}, tag: 'div', _class: 'dhx_grid-filter__label dxi dxi-magnify',
27-
// ref: 'netChange_filter', …}
25+
// { type: 1, attrs: {...}, tag: 'div', _class: 'dhx_grid-filter__label dxi dxi-magnify', ref: 'netChange_filter', ... }
2826

2927
@changelog:
30-
added in v8.0
28+
- The method may return an object with Calendar configuration since v9.3
29+
- Added in v8.0

docs/grid/api/headerfilter/setvalue_method.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,41 @@ description: You can explore the setValue method of the header filter of Grid in
1010

1111
@signature: {'setValue(value: string | string[] | Date | Date[]): void;'}
1212

13-
@params:
14-
- `value: string | string[] | Date | Date[]` - the value to be set for the filter
13+
@descr:
14+
#### Usage
1515

16-
:::info
17-
- An array of string values can be specified only for [`comboFilter`](/grid/configuration/#customizing-headerfooter-filters) in the `multiselection:true` mode.
16+
- for inputFilter, selectFilter, comboFilter
1817

19-
- For [`dateFilter`](/grid/configuration/#customizing-headerfooter-filters), the value must be passed strictly as a *Date* object (for a single selection) or an array of *Date[]* objects (for the `range` mode). *String* values are not supported by the `setValue()` method for this filter type.
20-
:::
18+
~~~jsx
19+
setValue(value: string): void;
20+
~~~
21+
22+
- for comboFilter
23+
24+
~~~jsx
25+
setValue(value: string | string[]): void;
26+
~~~
27+
28+
- for dateFilter
29+
30+
~~~jsx
31+
setValue(value: Date | Date[]): void;
32+
~~~
33+
34+
@params:
35+
- `value: string | string[] | Date | Date[]` - the value to be set for the filter
2136

2237
@example:
2338
grid.getHeaderFilter("country").setValue("Brazil");
2439

2540
@descr:
41+
:::info
42+
The [`dateFilter`](/grid/configuration/#headerfooter-filters) type of filter supports only the *Date object* values.
43+
:::
44+
45+
Note that in case of the enabled `multiselection` or `range` modes, the method awaits the value to be passed as an array.
46+
47+
**Related article**: [Header/footer filters](/grid/configuration/#headerfooter-filters)
2648

2749
@changelog:
2850

docs/grid/configuration.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,16 +1616,40 @@ You can define the logic of setting the position of the Grid footer as well as o
16161616
16171617
![](../assets/grid/footer_bottom_position.png)
16181618
1619-
Here is the example of positioning the footer and two frozen rows at the bottom of the Grid, as presented in the above image:
1619+
Here is the example of positioning the footer and a frozen row at the bottom of the Grid, as presented in the above image:
16201620
16211621
~~~jsx
16221622
const grid = new dhx.Grid("grid_container", {
16231623
columns: [
1624-
// columns config
1624+
{
1625+
id: "productId",
1626+
header: [{ text: "Product Id" }],
1627+
summary: "count",
1628+
footer: [{ text: summary => `Total: ${summary.count}` }],
1629+
},
1630+
{
1631+
id: "category",
1632+
header: [{ text: "Category" }],
1633+
},
1634+
{
1635+
id: "price",
1636+
type: "number",
1637+
numberMask: { prefix: "$" },
1638+
header: [{ text: "Price" }],
1639+
summary: "avg",
1640+
footer: [{ text: summary => `Avg: ${summary.avg}` }],
1641+
},
1642+
{
1643+
id: "stock",
1644+
type: "number",
1645+
header: [{ text: "Stock" }],
1646+
summary: "sum",
1647+
footer: [{ text: summary => `Total: ${summary.sum}` }],
1648+
},
16251649
],
16261650
data: dataset,
16271651
footerPosition: "bottom", // "relative" by default
1628-
bottomSplit: 2
1652+
bottomSplit: 1
16291653
});
16301654
~~~
16311655

0 commit comments

Comments
 (0)