Skip to content

Commit 8b60d9a

Browse files
committed
[update] grid column properties api pages and related guides
1 parent 24d3901 commit 8b60d9a

20 files changed

+114
-57
lines changed

docs/grid/api/api_gridcolumn_properties.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,31 @@ Click the name of the necessary property to see the details on its usage.
1111
| Property | Description |
1212
|---------------------------------------------------------------------- |------------------------------------------------------- |
1313
| [adjust](grid/api/gridcolumn_properties/gridcolumn_adjust_property.md) | (optional) *false* by default, defines whether the width of a column is automatically adjusted to its content |
14-
| [align](grid/api/gridcolumn_properties/gridcolumn_align_property.md) | (optional) aligns data in a column: "left"/"center"/ "right", *"left"* by default |
14+
| [align](grid/api/gridcolumn_properties/gridcolumn_align_property.md) | (optional) aligns data in a column: *"left"*/*"center"*/*"right"*|
1515
| [autoWidth](grid/api/gridcolumn_properties/gridcolumn_autowidth_property.md) | (optional) enables/disables the ability of a column to adjust its size to the size of Grid, *false* by default |
16-
| [closable](grid/api/gridcolumn_properties/gridcolumn_closable_property.md) | (optional) **PRO version only**, either allows closing a particular element of the [`group`](../../api/grid_group_config/) panel or makes it permanently enabled |
16+
| [closable](grid/api/gridcolumn_properties/gridcolumn_closable_property.md) | (optional) either allows closing a particular element of the [`group`](../../api/grid_group_config/) panel or makes it permanently enabled (**PRO version only**)|
1717
| [dateFormat](grid/api/gridcolumn_properties/gridcolumn_dateformat_property.md) | (optional) defines the format of dates. The date format must include delimiters (spaces or symbols), otherwise an error will be thrown |
1818
| [draggable](grid/api/gridcolumn_properties/gridcolumn_draggable_property.md) | (optional) defines whether a column is draggable, *false* by default |
1919
| [editable](grid/api/gridcolumn_properties/gridcolumn_editable_property.md) | (optional) defines whether a column is editable, *false* by default |
2020
| [editorConfig](grid/api/gridcolumn_properties/gridcolumn_editorconfig_property.md) | (optional) an object with configuration settings of the column's editor. The structure of this object depends on the specified type of the editor or the column |
21-
| [editorType](grid/api/gridcolumn_properties/gridcolumn_editortype_property.md) | (optional) the type of an editor used in a column: "input" | "select" | "combobox" | "textarea" | "multiselect" | "datePicker", *"input"* by default |
21+
| [editorType](grid/api/gridcolumn_properties/gridcolumn_editortype_property.md) | (optional) the type of an editor used in a column: *"input"*/*"select"*/*"combobox"*/*"textarea"*/*"multiselect"*/*"datePicker"* |
2222
| [footer](grid/api/gridcolumn_properties/gridcolumn_footer_property.md) | (optional) an array of objects with footer rows configuration |
23-
| [groupable](grid/api/gridcolumn_properties/gridcolumn_groupable_property.md) | (optional) **PRO version only**, enables data grouping by the values of a certain column |
23+
|[gravity](grid/api/gridcolumn_properties/gridcolumn_gravity_property.md)| (optional) sets the relative width proportions for Grid columns |
24+
| [groupable](grid/api/gridcolumn_properties/gridcolumn_groupable_property.md) | (optional) enables data grouping by the values of a certain column via the user interface (**PRO version only**) |
2425
| [header](grid/api/gridcolumn_properties/gridcolumn_header_property.md) | (required) an array of objects with header rows configuration |
25-
| [hidden](grid/api/gridcolumn_properties/gridcolumn_hidden_property.md) | (optional) defines whether a column is hidden, *false* by default |
26-
| [htmlEnable](grid/api/gridcolumn_properties/gridcolumn_htmlenable_property.md) | (optional) specifies the HTML content (inner HTML) of a column. If set to *false*, the content of the column cells will be displayed as a *string* value, *false* by default |
26+
| [hidden](grid/api/gridcolumn_properties/gridcolumn_hidden_property.md) | (optional) defines whether a column is hidden, *false* by default |
27+
| [htmlEnable](grid/api/gridcolumn_properties/gridcolumn_htmlenable_property.md) | (optional) allows using and displaying HTML content in a column. If set to *false*, the content of the column cells will be displayed as a *string* value, *false* by default |
2728
| [id](grid/api/gridcolumn_properties/gridcolumn_id_property.md) | (required) the id of a column |
28-
| [mark](grid/api/gridcolumn_properties/gridcolumn_mark_property.md) | (optional) either highlights the specified cells or applies the desired CSS classes to cells with minimal|maximal values in a column |
29+
| [mark](grid/api/gridcolumn_properties/gridcolumn_mark_property.md) | (optional) returns a template for marking a cell(s) or applies the desired CSS classes to cells with minimal/maximal values in a column |
2930
| [maxWidth](grid/api/gridcolumn_properties/gridcolumn_maxwidth_property.md) | (optional) the maximal width to be set for a column |
30-
| [minWidth](grid/api/gridcolumn_properties/gridcolumn_minwidth_property.md) | (optional) the minimum width to be set for a column, *20* by default |
31+
| [minWidth](grid/api/gridcolumn_properties/gridcolumn_minwidth_property.md) | (optional) the minimum width to be set for a column |
3132
| [numberMask](grid/api/gridcolumn_properties/gridcolumn_numbermask_property.md) | (optional) sets an input mask for entering number values |
32-
| [options](grid/api/gridcolumn_properties/gridcolumn_options_property.md) | (optional) specifies a set of options to be displayed in the editor of a cell. It is required if you specify editorType: "select" | "combobox" | "multiselect" |
33+
| [options](grid/api/gridcolumn_properties/gridcolumn_options_property.md) | (optional) specifies a set of options to be displayed in the editor of a cell. It is required if you specify `editorType:"select"/"combobox"/"multiselect"` |
3334
| [patternMask](grid/api/gridcolumn_properties/gridcolumn_patternmask_property.md) | (optional) sets an input mask for entering number and string values according to a special pattern |
3435
| [resizable](grid/api/gridcolumn_properties/gridcolumn_resizable_property.md) | (optional) defines whether a column can be resized, *false* by default |
3536
| [sortable](grid/api/gridcolumn_properties/gridcolumn_resizable_property.md) | (optional) defines whether a column is sortable, *true* by default |
3637
| [summary](grid/api/gridcolumn_properties/gridcolumn_closable_property.md) | (optional) creates the list of calculated values based on the column's data. The defined list is available only at the column's level |
37-
| [template](grid/api/gridcolumn_properties/gridcolumn_template_property.md) | (optional) a function which returns a template with content for a cell(s) |
38+
| [template](grid/api/gridcolumn_properties/gridcolumn_template_property.md) | (optional) a function which returns a template with content for a cell |
3839
| [tooltip](grid/api/gridcolumn_properties/gridcolumn_tooltip_property.md) | (optional) enables/disables the header tooltip, or sets the configuration object with the tooltip settings |
3940
| [tooltipTemplate](grid/api/gridcolumn_properties/gridcolumn_tooltiptemplate_property.md) | (optional) a function which returns a template for the content of the tooltip |
4041
| [type](grid/api/gridcolumn_properties/gridcolumn_footer_property.md) | (optional) the type of a column |

docs/grid/api/grid_groupable_config.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: You can explore the groupable config of Grid in the documentation o
66

77
# groupable
88

9-
@short: Optional. Enables grouping data by values in all columns
9+
@short: Optional. Enables grouping data by values in all columns via the user interface
1010

1111
:::tip pro version only
1212
The described functionality requires PRO version of the DHTMLX Grid (or DHTMLX Suite) package.
@@ -44,6 +44,12 @@ const grid = new dhx.Grid("grid_container", {
4444
- or by clicking a group element on the group panel
4545
- You can edit the nesting level of grouping by modifying the grouping order via either moving elements to the group panel or removing elements from the group panel
4646

47+
:::info important
48+
- Data grouping isn't intended for working with `lazyDataProxy`
49+
- Modifying the values of grouped elements won't modify the aggregated values
50+
- You mustn't change the order of elements grouping by drag-n-drop
51+
:::
52+
4753
**Related article**: [Grouping data](grid/usage.md#grouping-data)
4854

4955
@changelog: added in v9.0

docs/grid/api/grid_htmlenable_config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: You can explore the htmlEnable config of Grid in the documentation
66

77
# htmlEnable
88

9-
@short: Optional. Specifies the HTML content (inner HTML) of Grid columns
9+
@short: Optional. Allows using and displaying HTML content in Grid columns
1010

1111
@signature: {'htmlEnable?: boolean;'}
1212

docs/grid/api/gridcolumn_properties/gridcolumn_align_property.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ description: You can explore the align config of Grid column in the documentatio
1414
align?: "left" | "center" | "right";
1515
~~~
1616

17-
@default: "left"
18-
1917
@descr:
2018
### Example
2119

docs/grid/api/gridcolumn_properties/gridcolumn_autowidth_property.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ autoWidth?: boolean;
2222
~~~jsx
2323
const grid = new dhx.Grid("grid_container", {
2424
columns: [
25-
{ width: 200, id: "country", header: [{ text: "Country" }], autoWidth: false },
26-
{ width: 150, id: "population", header: [{ text: "Population" }] },
25+
{ id: "country", header: [{ text: "Country" }], autoWidth: false },
26+
{ id: "population", header: [{ text: "Population" }] },
2727
],
2828
autoWidth: true,
2929
data: dataset

docs/grid/api/gridcolumn_properties/gridcolumn_dateformat_property.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: You can explore the dateFormat config of Grid column in the documen
66

77
# dateFormat
88

9-
@short: Optional. Defines the format of dates
9+
@short: Optional. Defines the [format of dates](calendar/api/calendar_dateformat_config.md)
1010

1111
:::note
1212
The date format must include delimiters (spaces or symbols), otherwise an error will be thrown

docs/grid/api/gridcolumn_properties/gridcolumn_editable_property.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ editable?: boolean;
2323
const grid = new dhx.Grid("grid_container", {
2424
columns: [
2525
{
26-
width: 150, id:"project",
27-
editable: false,
28-
header: [{text: "Project"}, {content: "selectFilter"}]
26+
width: 150, id: "project",
27+
editable: false,
28+
header: [{ text: "Project" }, { content: "selectFilter" }]
2929
},
30-
{ width:150, id: "owner", header: [{text: "Owner"},{content: "inputFilter"}]},
31-
{ width:150, id: "hours", header: [{text: "Hours"}, {content: "inputFilter"}]},
30+
{ width: 150, id: "owner", header: [{ text: "Owner" }, { content: "inputFilter" }]},
31+
{ width: 150, id: "hours", header: [{ text: "Hours" }, { content: "inputFilter" }]},
3232
// more columns
3333
],
34-
data: data,
3534
editable: true
35+
// more options
3636
});
3737
~~~
3838

docs/grid/api/gridcolumn_properties/gridcolumn_editortype_property.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ description: You can explore the editorType config of Grid column in the documen
1414
editorType?: "input" | "select" | "datePicker" | "combobox" | "multiselect" | "textarea";
1515
~~~
1616

17-
@default: "input"
17+
@default:
18+
19+
- for the column `type: string`:
20+
- with the `autoHeight` configuration option: the "textarea" editor type
21+
- without the `autoHeight` configuration option: the "input" editor type
22+
- for the column `type: date`: the "datePicker" editor type
23+
- for the column `type: number`: the "input" editor type
1824

1925
@descr:
2026
### Example

docs/grid/api/gridcolumn_properties/gridcolumn_footer_property.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@ description: You can explore the footer config of Grid column in the documentati
1313
~~~jsx
1414
footer?: [
1515
{
16-
text?: string | ((content: {
17-
[key: string]: string | number | null
18-
}) => string),
16+
text?:
17+
string |
18+
((content: {
19+
[key: string]: string | number | null
20+
}) => string),
1921
tooltip?: boolean | object, // true by default
2022
tooltipTemplate?: (
21-
content: { value: string } & { [key: string]: string | number | null },
23+
content: {
24+
[key: string]: string | number | null;
25+
value: string;
26+
},
2227
header: IHeader,
2328
column: ICol
2429
) => string | boolean,
@@ -59,7 +64,7 @@ Each footer object may include:
5964
<td><b>css</b></td><td>(optional) styling to be applied to a footer</td>
6065
</tr>
6166
<tr>
62-
<td><b>htmlEnable</b></td><td>(optional) <i>false</i> by default. If set to <i>true</i>, specifies the HTML content (inner HTML) of a footer. If set to <i>false</i>, the content of the footer cells will be displayed as a <i>string</i> value</td>
67+
<td><b>htmlEnable</b></td><td>(optional) <i>false</i> by default. If set to <i>true</i>, allows using and displaying HTML content in a footer. If set to <i>false</i>, the content of the footer cells will be displayed as a <i>string</i> value</td>
6368
</tr>
6469
</tbody>
6570
</table>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
sidebar_label: gravity
3+
title: JavaScript Grid - gravity Config
4+
description: You can explore the gravity config of Grid in the documentation of the DHTMLX JavaScript UI library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Suite.
5+
---
6+
7+
# gravity
8+
9+
@short: Optional. Sets the relative width proportions for Grid columns
10+
11+
### Usage
12+
13+
~~~jsx
14+
gravity?: number;
15+
~~~
16+
17+
@descr:
18+
### Example
19+
20+
~~~jsx
21+
const grid = new dhx.Grid("grid_container", {
22+
columns: [
23+
{ id: "density", header: [{ text: "Density (P/Km²)" }], gravity: 1 },
24+
// the column with the "area" id is two times wider than the column with the "density" id
25+
{ id: "area", header: [{ text: "Land Area (Km²)" }], gravity: 2 },
26+
],
27+
autoWidth: true,
28+
// more options
29+
});
30+
~~~

0 commit comments

Comments
 (0)