Skip to content

Commit 34cd9ea

Browse files
committed
[update] docs for v9.1
1 parent 20c18e1 commit 34cd9ea

File tree

7 files changed

+40
-47
lines changed

7 files changed

+40
-47
lines changed
55.6 KB
Loading
77.7 KB
Loading

docs/data_collection/api/datacollection_getsortingstates_method.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@ description: You can explore the getSortingStates method of DataCollection in th
88

99
@short: returns an array of objects with the current parameters of sorting applied to the data
1010

11-
:::note
12-
The method allows getting the result of sorting data by multiple columns.
13-
:::
14-
1511
## Usage
1612

1713
~~~jsx
1814
interface ISortingState {
19-
by?: string | number,
20-
dir?: "asc" | "desc",
15+
by: string | number,
16+
dir: "asc" | "desc",
2117
as?: (a) => any,
2218
rule?: (a, b) => number,
2319
smartSorting?: boolean
@@ -48,15 +44,15 @@ The array returned by the method contains objects with the following properties:
4844
</tr>
4945
<tr>
5046
<td><b>as</b></td>
51-
<td>(<i>function</i>) a custom function of converting values before comparing</td>
47+
<td>(<i>function</i>) optional, a custom function of converting values before comparing</td>
5248
</tr>
5349
<tr>
5450
<td><b>rule</b></td>
55-
<td>(<i>function</i>) a custom sorting function</td>
51+
<td>(<i>function</i>) optional, a custom sorting function</td>
5652
</tr>
5753
<tr>
5854
<td><b>smartSorting</b></td>
59-
<td>(<i>boolean</i>) (if applied) specifies whether a sorting rule should be applied each time after changing the data set</td>
55+
<td>(<i>boolean</i>) optional, (if applied) specifies whether a sorting rule should be applied each time after changing the data set</td>
6056
</tr>
6157
</tbody>
6258
</table>

docs/grid/usage.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -345,21 +345,13 @@ grid.data.sort({
345345
The described functionality requires PRO version of the DHTMLX Grid (or DHTMLX Suite) package.
346346
:::
347347

348-
You can sort Grid by multiple columns simultaneously. The multi-sorting ability is enabled by default. If you need to disable it, set the [`multiSort`](grid/api/grid_multisort_config.md) Grid property to *false*.
348+
You can sort Grid by multiple columns simultaneously.
349349

350-
~~~jsx
351-
const grid = new dhx.Grid("grid_container", {
352-
columns: [
353-
// columns config
354-
],
355-
multiSort: false,
356-
data: dataset
357-
});
358-
~~~
350+
![](../assets/grid/multisorting_data.png)
359351

360352
**Related sample**: [Grid. Sorting by multiple columns (multisorting)](https://snippet.dhtmlx.com/4ej0i3qi)
361353

362-
It is also possible to apply multi-sorting to [the grouped data](grid/usage.md#grouping-data). Check the example below:
354+
Multi-sorting is enabled on initialization of the component. In the example below Grid data is sorted with the help of the `sort()` method of [DataCollection](data_collection.md) by several columns:
363355

364356
~~~jsx
365357
const grid = new dhx.Grid("grid_container", {
@@ -379,8 +371,22 @@ grid.data.sort({ by: "task_status", dir: "asc" });
379371
grid.data.sort({ by: "animal_type", dir: "asc" });
380372
~~~
381373

374+
![](../assets/grid/multisort_grouped_data.png)
375+
382376
**Related sample**: [Grid. Grouping with sorting by multiple columns (multisorting)](https://snippet.dhtmlx.com/786zr190)
383377

378+
If you need to disable the multi-sorting ability, set the [`multiSort`](grid/api/grid_multisort_config.md) Grid property to *false*.
379+
380+
~~~jsx
381+
const grid = new dhx.Grid("grid_container", {
382+
columns: [
383+
// columns config
384+
],
385+
multiSort: false,
386+
data: dataset
387+
});
388+
~~~
389+
384390
#### Custom sorting
385391

386392
You can also specify the `rule` attribute in a passed object instead of the default ones and set a custom function for sorting. For example:

docs/integration/suite_and_backend.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,25 @@ description: You can explore how to connect DHTMLX Suite to a backend. Browse de
88

99
![](../assets/integration/work_with_backend.png)
1010

11-
DHTMLX Suite 9 or DHTMLX components don't have any special requirements for the backend. They can be easily connected with any backend platform which supports the REST API (RESTful API).
11+
DHTMLX Suite 9 or DHTMLX components don't have any special requirements for the backend. They can be easily connected with any backend platform which supports the REST API (RESTful API). Besides, the DHTMLX library allows providing a [multi-user backend](#multiuser-real-time-updated-backend-save-method-getting-editing-deleting-and-sending-data) for any Suite component.
1212

13-
The DHTMLX library includes the [DataCollection](/data_collection/) helper that completely supports REST API for dealing with the backend.
13+
The DHTMLX library includes the [DataCollection](/data_collection/) helper that completely supports REST API for dealing with the backend. Thus, to transfer data from your backend to the Suite components, all you need to do is create a valid JSON dataset. You can load it into the component using the [load()](/data_collection/api/datacollection_load_method/) method of DataCollection.
1414

15-
Thus, to transfer data from your backend to the Suite components, all you need to do is create a valid JSON dataset. You can load it into the component using the [load()](/data_collection/api/datacollection_load_method/) method of DataCollection.
1615

17-
Besides, the DHTMLX library allows providing a [multi-user backend](#multi-user-backend-for-suite-widgets) for any Suite component.
1816

1917
## Examples of using DHTMLX Suite widgets with Node.js
2018

21-
Let's have an overview of the examples.
22-
2319
:::info
2420
Download and take a look at the [Examples of using DHTMLX Suite widgets with Node.js](https://github.com/DHTMLX/nodejs-suite-demo).
2521
:::
2622

27-
Here you can find 11 interactive samples. Follow the instructions in the README.md file to run the examples.
23+
Here you can find 12 interactive samples. Follow the instructions in the README.md file to run the examples.
2824

2925
You can easily modify any widget for your purposes and find out how it works.
3026

27+
:::tip note
3128
Pay attention: the components of the demo work with one database. When editing data in one component, you affect data in other components.
29+
:::
3230

3331
To reset the database, stop the server and delete the file with the `.sqlite` extension from the root directory of the project.
3432

@@ -124,17 +122,17 @@ The following request methods are used in this example: `GET`, `PUT`, `POST`, `D
124122

125123
![](../assets/integration/work_with_backend_save.png)
126124

127-
The example is created to show you how to save the changes made in data to the backend via the **save()** method of DataCollection.
125+
The example is created to show you how to save the changes made in data to the backend via the `save()` method of DataCollection.
128126

129127
This example of Grid is visually the same as the previous one but the ways of adding and editing data in this example are developed in another way. For instance, after you click the "Add new card" button, an empty row will be added after the last row in the grid. Editing of any cell of the grid is implemented by double-clicking on the cell.
130128

131129
The following request methods are used in this example: `GET`, `PUT`, `POST`, `DELETE`.
132130

133-
## Multi-user backend for Suite widgets
131+
### Multiuser (real-time updated) backend. Save method. Getting, editing, deleting, and sending data
134132

135-
You can create a multi-user (real-time updated) backend for Suite widgets. The backend can be implemented in any language and you can use any library to allow the client and the server sides interact via the WebSocket protocol.
133+
This example shows how to implement a multi-user backend for Grid with the help of Node.js and the Faye library to provide live data updates.
136134

137-
There is an [example](https://github.com/DHTMLX/nodejs-suite-demo/blob/master/public/views/12_grid_with_form_multiuser.html) that shows a multi-user backend for Grid, implemented with the help of Node.js and the Faye library. You can provide live data updates for any Suite widget based on this example.
135+
You can create a multi-user (real-time updated) backend for any Suite widget. The backend can be implemented in any language, and you can use any library that will allow the client and the server sides interact via the WebSocket protocol.
138136

139137
:::info
140138
Download and take a look at the [Examples of using DHTMLX Suite widgets with Node.js](https://github.com/DHTMLX/nodejs-suite-demo).

docs/tree_collection/api/treecollection_getsortingstates_method.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@ description: You can explore the getSortingStates method of TreeCollection in th
88

99
@short: returns an array of objects with the current parameters of sorting applied to the data
1010

11-
:::note
12-
The method allows getting the result of sorting data by multiple columns.
13-
:::
14-
1511
## Usage
1612

1713
~~~jsx
1814
interface ISortingState {
19-
by?: string | number,
20-
dir?: "asc" | "desc",
15+
by: string | number,
16+
dir: "asc" | "desc",
2117
as?: (a) => any,
2218
rule?: (a, b) => number,
2319
smartSorting?: boolean
@@ -39,23 +35,23 @@ The array returned by the method contains objects with the following properties:
3935
<tbody>
4036
<tr>
4137
<td><b>by</b></td>
42-
<td>(<i>string | number</i>) the id of a data field (a column of Grid) to sort by</td>
38+
<td>(<i>string | number</i>) the id of a data field to sort by</td>
4339
</tr>
4440
<tr>
4541
<td><b>dir</b></td>
4642
<td>(<i>string</i>) the direction of sorting: "asc" or "desc"</td>
4743
</tr>
4844
<tr>
4945
<td><b>as</b></td>
50-
<td>(<i>function</i>) a custom function of converting values before comparing</td>
46+
<td>(<i>function</i>) optional, a custom function of converting values before comparing</td>
5147
</tr>
5248
<tr>
5349
<td><b>rule</b></td>
54-
<td>(<i>function</i>) a custom sorting function</td>
50+
<td>(<i>function</i>) optional, a custom sorting function</td>
5551
</tr>
5652
<tr>
5753
<td><b>smartSorting</b></td>
58-
<td>(<i>boolean</i>) (if applied) specifies whether a sorting rule should be applied each time after changing the data set</td>
54+
<td>(<i>boolean</i>) optional, (if applied) specifies whether a sorting rule should be applied each time after changing the data set</td>
5955
</tr>
6056
</tbody>
6157
</table>

docs/whatsnew.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,21 @@ This version brings some updates in the API methods. Check the [Migration](migra
2020

2121
### New functionality
2222

23-
#### Common features
24-
25-
- [Multi-user (live update) backend](integration/suite_and_backend.md#multi-user-backend-for-suite-widgets) for Suite widgets
26-
2723
#### Grid
2824

2925
- [Row expander](grid/configuration.md#row-expander) with the possibility to insert any Suite widget or HTML content (PRO version)
3026
- [Multi-sorting](grid/usage.md#sorting-by-multiple-columns) functionality that allows sorting Grid by several columns (PRO version)
3127

3228
### Fixes
3329

34-
- DataCollection. The `sort()` method called without arguments doesn't reset the applied sorting
30+
- DataCollection/TreeCollection. The `sort()` method called without arguments doesn't reset the applied sorting
3531
- Grid. Falsy firing of data events on row drag-n-drop
3632
- Toolbar. Menu wrong item positioning
3733
- TreeCollection. The `restoreOrder()` method doesn't reset the applied sorting
3834

3935
### New samples
4036

37+
- [Multiuser (real-time updated) backend. Save method. Getting, editing, deleting, and sending data](https://github.com/DHTMLX/nodejs-suite-demo/blob/master/public/views/12_grid_with_form_multiuser.html)
4138
- [Grid. Grouping and template in group headers](https://snippet.dhtmlx.com/dywmb6ec)
4239
- [Grid. Search and highlight results](https://snippet.dhtmlx.com/p74701lu)
4340
- [Grid. Hiding columns using header context menu](https://snippet.dhtmlx.com/ygfj3uo3)
@@ -2279,7 +2276,7 @@ Released on January 28, 2020
22792276
- The possibility [to set selection to multiple cells/rows of Grid](grid/usage.md#using-selection-api) via the `setCell()` method of the selection object
22802277
- New additional arrow keyboard shortcuts are added to [Keyboard navigation](grid/configuration.md#keyboard-navigation)
22812278
- The ability [to sort content of any Grid column by clicking on its header](grid/configuration.md#sortable-columns) via the [](grid/api/grid_sortable_config.md) property
2282-
- The [](grid/api/grid_getsortingstate_method.md) method that [allows getting the current state of sorting data in Grid](grid/usage.md#getting-the-sorting-state) is added
2279+
- The `getSortingState()` method that [allows getting the current state of sorting data in Grid](grid/usage.md#getting-the-sorting-state) is added
22832280
- The possibility [to check visibility of a column](grid/usage.md#checking-visibility-of-a-column) via the [](grid/api/grid_iscolumnhidden_method.md) method
22842281
- The ability to enable [dynamic loading of data in Grid](grid/data_loading.md#dynamic-loading)
22852282
- The [](grid/api/grid_afterkeydown_event.md) and [](grid/api/grid_beforekeydown_event.md) events are added

0 commit comments

Comments
 (0)