Skip to content

Commit 9958f2b

Browse files
authored
Merge branch 'next' into cols-rows-hiding-showing-4353
2 parents 7b18e52 + 98b10f2 commit 9958f2b

34 files changed

+553
-165
lines changed

docs/api/api_overview.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Parameters:
3434
| [](api/spreadsheet_eachcell_method.md) | @getshort(api/spreadsheet_eachcell_method.md) |
3535
| [](api/spreadsheet_endedit_method.md) | @getshort(api/spreadsheet_endedit_method.md) |
3636
| [](api/spreadsheet_fitcolumn_method.md) | @getshort(api/spreadsheet_fitcolumn_method.md) |
37+
| [](api/spreadsheet_freezecols_method.md) | @getshort(api/spreadsheet_freezecols_method.md) |
38+
| [](api/spreadsheet_freezerows_method.md) | @getshort(api/spreadsheet_freezerows_method.md) |
3739
| [](api/spreadsheet_getactivesheet_method.md) | @getshort(api/spreadsheet_getactivesheet_method.md) |
3840
| [](api/spreadsheet_getfilter_method.md) | @getshort(api/spreadsheet_getfilter_method.md) |
3941
| [](api/spreadsheet_getformat_method.md) | @getshort(api/spreadsheet_getformat_method.md) |
@@ -64,6 +66,8 @@ Parameters:
6466
| [](api/spreadsheet_showrows_method.md) | @getshort(api/spreadsheet_showrows_method.md) |
6567
| [](api/spreadsheet_startedit_method.md) | @getshort(api/spreadsheet_startedit_method.md) |
6668
| [](api/spreadsheet_undo_method.md) | @getshort(api/spreadsheet_undo_method.md) |
69+
| [](api/spreadsheet_unfreezecols_method.md) | @getshort(api/spreadsheet_unfreezecols_method.md) |
70+
| [](api/spreadsheet_unfreezerows_method.md) | @getshort(api/spreadsheet_unfreezerows_method.md) |
6771
| [](api/spreadsheet_unlock_method.md) | @getshort(api/spreadsheet_unlock_method.md) |
6872

6973
## Spreadsheet events
@@ -74,6 +78,7 @@ Parameters:
7478
| [](api/spreadsheet_afterclear_event.md) | @getshort(api/spreadsheet_afterclear_event.md) |
7579
| [](api/spreadsheet_aftercolumnadd_event.md) | @getshort(api/spreadsheet_aftercolumnadd_event.md) |
7680
| [](api/spreadsheet_aftercolumndelete_event.md) | @getshort(api/spreadsheet_aftercolumndelete_event.md) |
81+
| [](api/spreadsheet_afterdataloaded_event.md) | @getshort(api/spreadsheet_afterdataloaded_event.md) |
7782
| [](api/spreadsheet_aftereditend_event.md) | @getshort(api/spreadsheet_aftereditend_event.md) |
7883
| [](api/spreadsheet_aftereditstart_event.md) | @getshort(api/spreadsheet_aftereditstart_event.md) |
7984
| [](api/spreadsheet_afterfocusset_event.md) | @getshort(api/spreadsheet_afterfocusset_event.md) |
@@ -117,15 +122,14 @@ Parameters:
117122
| [](api/spreadsheet_exportmodulepath_config.md) | @getshort(api/spreadsheet_exportmodulepath_config.md) |
118123
| [](api/spreadsheet_formats_config.md) | @getshort(api/spreadsheet_formats_config.md) |
119124
| [](api/spreadsheet_importmodulepath_config.md) | @getshort(api/spreadsheet_importmodulepath_config.md) |
120-
| [](api/spreadsheet_leftsplit_config.md) | @getshort(api/spreadsheet_leftsplit_config.md) |
121125
| [](api/spreadsheet_localization_config.md) | @getshort(api/spreadsheet_localization_config.md) |
122126
| [](api/spreadsheet_menu_config.md) | @getshort(api/spreadsheet_menu_config.md) |
123127
| [](api/spreadsheet_multisheets_config.md) | @getshort(api/spreadsheet_multisheets_config.md) |
124128
| [](api/spreadsheet_readonly_config.md) | @getshort(api/spreadsheet_readonly_config.md) |
125129
| [](api/spreadsheet_rowscount_config.md) | @getshort(api/spreadsheet_rowscount_config.md) |
126130
| [](api/spreadsheet_timeformat_config.md) | @getshort(api/spreadsheet_timeformat_config.md) |
127131
| [](api/spreadsheet_toolbarblocks_config.md) | @getshort(api/spreadsheet_toolbarblocks_config.md) |
128-
| [](api/spreadsheet_topsplit_config.md) | @getshort(api/spreadsheet_topsplit_config.md) |
132+
129133

130134
## Selection methods
131135

docs/api/overview/actions_overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,12 @@ spreadsheet.events.on("beforeColumnAdd", function(cell){
7575
| **sortCells** | The action is executed when sorting data in spreadsheet |
7676
| **setCellStyle** | The action is executed when changing the style of a cell |
7777
| **toggleVisibility** | The action is executed when hiding/showing a column or a row |
78+
| **toggleFreeze** | The action is executed when freezing/unfreezing columns/rows |
7879
| **unmerge** | The action is executed when splitting cells |
7980

8081
**Change log:**
8182

83+
- The **toggleFreeze** and **toggleVisibility** actions were added in v5.2
8284
- The **merge**, **unmerge**, **filter**, **fitColumn**, **insertLink** actions were added in v5.0
8385

8486
**Related sample:** [Spreadsheet. Actions](https://snippet.dhtmlx.com/efcuxlkt)

docs/api/overview/events_overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ description: You can have an Events overview of the DHTMLX JavaScript Spreadshee
1212
| [](../spreadsheet_afterclear_event.md) | @getshort(../spreadsheet_afterclear_event.md) |
1313
| [](../spreadsheet_aftercolumnadd_event.md) | @getshort(../spreadsheet_aftercolumnadd_event.md) |
1414
| [](../spreadsheet_aftercolumndelete_event.md) | @getshort(../spreadsheet_aftercolumndelete_event.md) |
15+
| [](../spreadsheet_afterdataloaded_event.md) | @getshort(../spreadsheet_afterdataloaded_event.md) |
1516
| [](../spreadsheet_aftereditend_event.md) | @getshort(../spreadsheet_aftereditend_event.md) |
1617
| [](../spreadsheet_aftereditstart_event.md) | @getshort(../spreadsheet_aftereditstart_event.md) |
1718
| [](../spreadsheet_afterfocusset_event.md) | @getshort(../spreadsheet_afterfocusset_event.md) |

docs/api/overview/methods_overview.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ description: You can have a Methods overview of the DHTMLX JavaScript Spreadshee
1818
| [](../spreadsheet_eachcell_method.md) | @getshort(../spreadsheet_eachcell_method.md) |
1919
| [](../spreadsheet_endedit_method.md) | @getshort(../spreadsheet_endedit_method.md) |
2020
| [](../spreadsheet_fitcolumn_method.md) | @getshort(../spreadsheet_fitcolumn_method.md) |
21+
| [](../spreadsheet_freezecols_method.md) | @getshort(../spreadsheet_freezecols_method.md) |
22+
| [](../spreadsheet_freezerows_method.md) | @getshort(../spreadsheet_freezerows_method.md) |
2123
| [](../spreadsheet_getactivesheet_method.md) | @getshort(../spreadsheet_getactivesheet_method.md) |
2224
| [](../spreadsheet_getfilter_method.md) | @getshort(../spreadsheet_getfilter_method.md) |
2325
| [](../spreadsheet_getformat_method.md) | @getshort(../spreadsheet_getformat_method.md) |
@@ -48,4 +50,6 @@ description: You can have a Methods overview of the DHTMLX JavaScript Spreadshee
4850
| [](../spreadsheet_showrows_method.md) | @getshort(../spreadsheet_showrows_method.md) |
4951
| [](../spreadsheet_startedit_method.md) | @getshort(../spreadsheet_startedit_method.md) |
5052
| [](../spreadsheet_undo_method.md) | @getshort(../spreadsheet_undo_method.md) |
53+
| [](../spreadsheet_unfreezecols_method.md) | @getshort(../spreadsheet_unfreezecols_method.md) |
54+
| [](../spreadsheet_unfreezerows_method.md) | @getshort(../spreadsheet_unfreezerows_method.md) |
5155
| [](../spreadsheet_unlock_method.md) | @getshort(../spreadsheet_unlock_method.md) |

docs/api/overview/properties_overview.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ description: You can have a Properties overview of the DHTMLX JavaScript Spreads
1414
| [](../spreadsheet_exportmodulepath_config.md) | @getshort(../spreadsheet_exportmodulepath_config.md) |
1515
| [](../spreadsheet_formats_config.md) | @getshort(../spreadsheet_formats_config.md) |
1616
| [](../spreadsheet_importmodulepath_config.md) | @getshort(../spreadsheet_importmodulepath_config.md) |
17-
| [](../spreadsheet_leftsplit_config.md) | @getshort(../spreadsheet_leftsplit_config.md) |
1817
| [](../spreadsheet_localization_config.md) | @getshort(../spreadsheet_localization_config.md) |
1918
| [](../spreadsheet_menu_config.md) | @getshort(../spreadsheet_menu_config.md) |
2019
| [](../spreadsheet_multisheets_config.md) | @getshort(../spreadsheet_multisheets_config.md) |
2120
| [](../spreadsheet_readonly_config.md) | @getshort(../spreadsheet_readonly_config.md) |
2221
| [](../spreadsheet_rowscount_config.md) | @getshort(../spreadsheet_rowscount_config.md) |
2322
| [](../spreadsheet_timeformat_config.md) | @getshort(../spreadsheet_timeformat_config.md) |
2423
| [](../spreadsheet_toolbarblocks_config.md) | @getshort(../spreadsheet_toolbarblocks_config.md) |
25-
| [](../spreadsheet_topsplit_config.md) | @getshort(../spreadsheet_topsplit_config.md) |
24+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
sidebar_label: afterDataLoaded
3+
title: afterDataLoaded event
4+
description: You can learn about the afterDataLoaded event in the documentation of the DHTMLX JavaScript Spreadsheet library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Spreadsheet.
5+
---
6+
7+
# afterDataLoaded
8+
9+
### Description
10+
11+
@short: Fires after data loading is complete
12+
13+
### Usage
14+
15+
~~~jsx
16+
afterColumnAdd: (cell: string) => void;
17+
~~~
18+
19+
### Example
20+
21+
~~~jsx
22+
const spreadsheet = new dhx.Spreadsheet("spreadsheet_container", {});
23+
spreadsheet.parse(data);
24+
25+
// subscribe to the "afterDataLoaded" event
26+
spreadsheet.events.on("afterDataLoaded", () => {
27+
dhx.message({
28+
text: "Data is successfully loaded into Spreadsheet!",
29+
css: "dhx_message--success",
30+
expire: 5000
31+
});
32+
});
33+
~~~
34+
35+
**Change log:** Added in v5.2
36+
37+
**Related article:** [Event handling](handling_events.md)
38+
39+
**Related sample:** [Spreadsheet. Data loaded event](https://snippet.dhtmlx.com/vxr7amz6)
40+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
sidebar_label: freezeCols()
3+
title: freezeCols method
4+
description: You can learn about the freezeCols method in the documentation of the DHTMLX JavaScript Spreadsheet library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Spreadsheet.
5+
---
6+
7+
# freezeCols()
8+
9+
### Description
10+
11+
@short: Fixes ("freezes") columns
12+
13+
### Usage
14+
15+
~~~jsx
16+
freezeCols(cell?: string): void;
17+
~~~
18+
19+
### Parameters
20+
21+
- `cell` - (optional) the id of the cell used to define the id of a column. If the cell id isn't passed, the currently selected cell will be used
22+
23+
### Example
24+
25+
~~~jsx
26+
spreadsheet.freezeCols("B2"); // the columns up to the "B" column will be fixed
27+
spreadsheet.freezeCols("sheet2!B2"); // the columns up to the "B" column in "sheet2" will be fixed
28+
~~~
29+
30+
**Related articles:** [Work with Spreadsheet](working_with_ssheet.md/#freezingunfreezing-rows-and-columns)
31+
32+
**Related API:** [`unfreezeCols()`](api/spreadsheet_unfreezecols_method.md/)
33+
34+
**Related sample:** [Spreadsheet. Freezing columns and rows via API](https://snippet.dhtmlx.com/a12xd1mn)
35+
36+
**Change log:**
37+
Added in v5.2
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
sidebar_label: freezeRows()
3+
title: freezeRows method
4+
description: You can learn about the freezeRows method in the documentation of the DHTMLX JavaScript Spreadsheet library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Spreadsheet.
5+
---
6+
7+
# freezeRows()
8+
9+
### Description
10+
11+
@short: Fixes ("freezes") rows
12+
13+
### Usage
14+
15+
~~~jsx
16+
freezeRows(cell?: string): void;
17+
~~~
18+
19+
### Parameters
20+
21+
- `cell` - (optional) the id of the cell used to define the id of a row. If the cell id isn't passed, the currently selected cell will be used
22+
23+
### Example
24+
25+
~~~jsx
26+
spreadsheet.freezeRows("B2"); // the rows up to the second row will be fixed
27+
spreadsheet.freezeRows("sheet2!B2"); // the rows up to the second row in "sheet2" will be fixed
28+
~~~
29+
30+
**Related articles:** [Work with Spreadsheet](working_with_ssheet.md/#freezingunfreezing-rows-and-columns)
31+
32+
**Related API:** [`unfreezeRows()`](api/spreadsheet_unfreezerows_method.md/)
33+
34+
**Related sample:** [Spreadsheet. Freezing columns and rows via API](https://snippet.dhtmlx.com/a12xd1mn)
35+
36+
**Change log:**
37+
Added in v5.2

docs/api/spreadsheet_leftsplit_config.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

docs/api/spreadsheet_parse_method.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ parse({
7777
to: { column: index, row: index }
7878
},
7979
// more objects
80-
]
80+
],
81+
freeze?: {
82+
col?: number,
83+
row?: number,
84+
}
8185
},
8286
// more sheet objects
8387
]
@@ -132,6 +136,10 @@ If you need to create a data set *for several sheets* at once, specify data as a
132136
- `to` - an object which defines the position of the last cell from a range:
133137
- `column` - the index of the column
134138
- `row` - the index of the row
139+
- `freeze` - (optional) an object that sets and adjusts fixed columns/rows for particular sheets. It may contain the following properties:
140+
- `col` - (optional) specifies the number of fixed columns, for example, 2
141+
- `row` - (optional) specifies the number of fixed rows, for example, 2
142+
The default value of the parameter is `freeze: {col: 0, row: 0}`
135143

136144
:::info
137145
In case the [`multisheets`](api/spreadsheet_multisheets_config.md) configuration option is set to *false*, only one sheet will be created.

0 commit comments

Comments
 (0)