Skip to content

Commit 5fc4bab

Browse files
committed
[update] correct and complete docs for v5.2
1 parent fdf9bf2 commit 5fc4bab

File tree

8 files changed

+142
-154
lines changed

8 files changed

+142
-154
lines changed

docs/api/spreadsheet_parse_method.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,8 @@ If you need to create a data set *for several sheets* at once, specify data as a
137137
- `column` - the index of the column
138138
- `row` - the index of the row
139139
- `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}`
140+
- `col` - (optional) specifies the number of fixed columns (e.g. 2), *0* by default
141+
- `row` - (optional) specifies the number of fixed rows, (e.g. 2), *0* by default
143142

144143
:::info
145144
In case the [`multisheets`](api/spreadsheet_multisheets_config.md) configuration option is set to *false*, only one sheet will be created.
@@ -172,7 +171,7 @@ const spreadsheet = new dhx.Spreadsheet("spreadsheet", {});
172171
spreadsheet.parse(data);
173172
~~~
174173

175-
~~~jsx {38} title="Example 2. Load data into several sheets"
174+
~~~jsx title="Example 2. Load data into several sheets"
176175
const data = {
177176
sheets : [
178177
{
@@ -197,7 +196,11 @@ const data = {
197196
{ from: { column: 0, row: 0 }, to: { column: 1, row: 0 } },
198197
// merge cells A2, A3, A4, and A5
199198
{ from: { column: 0, row: 1 }, to: { column: 0, row: 4 } }
200-
]
199+
],
200+
freeze: {
201+
col: 2,
202+
row: 2
203+
},
201204
},
202205
{
203206
name: "sheet 2",
@@ -278,10 +281,11 @@ but in some cases they may not work in the way you expect (for example, when app
278281

279282
**Change log:**
280283

284+
- The **freeze** property and the **hidden** parameter for the **rows** and **cols** properties of the **sheets** object were added in v5.2
281285
- The **locked** and **link** properties of the **cell** object were added in v5.1
282-
- The **merged** property of the **sheet** object was added in v5.0
286+
- The **merged** property of the **sheets** object was added in v5.0
283287
- The **editor** property of the **cell** object was added in v4.3
284-
- The **rows** and **cols** properties of the **sheet** object were added in v4.2
288+
- The **rows** and **cols** properties of the **sheets** object were added in v4.2
285289
- The ability to prepare data for several sheets was added in v4.1
286290

287291
**Related articles:** [Data loading and export](loading_data.md)

docs/api/spreadsheet_sortcells_method.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ sortCells(cell: string, dir: number): void;
2727

2828
~~~jsx {7,10}
2929
const spreadsheet = new dhx.Spreadsheet("spreadsheet", {
30-
topSplit: 1
30+
// configuration parameters
3131
});
3232
spreadsheet.parse(data);
3333

@@ -38,9 +38,6 @@ spreadsheet.sortCells("B2:B11", -1);
3838
spreadsheet.sortCells("Income!B2:B11, Report!B2:B11, Expenses!C2:C11", 1);
3939
~~~
4040

41-
:::info
42-
Use the [topSplit](api/spreadsheet_topsplit_config.md) property if you need to exclude the top rows from sorting.
43-
:::
4441

4542
**Related sample:** [Spreadsheet. Initialization with multiple sheets](https://snippet.dhtmlx.com/ihtkdcoc)
4643

docs/api/spreadsheet_toolbarblocks_config.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ toolbarBlocks: ["undo", "colors", "decoration", "align", "cell", "format", "acti
2424

2525
### Example
2626

27-
~~~jsx {3-15}
27+
~~~jsx {3-17}
2828
const spreadsheet = new dhx.Spreadsheet("spreadsheet_container", {
2929
// full toolbar
3030
toolbarBlocks: [
@@ -58,8 +58,9 @@ const spreadsheet = new dhx.Spreadsheet("spreadsheet_container", {
5858
Check how you can [customize the toolbar](customization.md/#toolbar).
5959

6060
**Change log:**
61-
- The *"actions"* block is added in v5.0
62-
- The *"cell"* block is added in v5.2
61+
62+
- The *"cell"* block was added in v5.2
63+
- The *"actions"* block was added in v5.0
6364

6465
**Related articles:**
6566
- [Configuration](configuration.md#toolbar)

docs/customization.md

Lines changed: 71 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,15 @@ It is also possible to add the blocks enumerated below:
158158
- the **Rows** block
159159
- the *Add row* button (id: "add-row")
160160
- the *Remove row* button (id: "remove-row")
161+
- the *Unfreeze rows* button (id: "unfreeze-rows")
162+
- the *Freeze up to row [id]* (id: "freeze-rows")
163+
- the *Hide row(s) [id]* (id: "hide-rows")
161164
- the **Columns** block
162165
- the *Add column* button (id: "add-col")
163166
- the *Remove column* button (id: "remove-col")
167+
- the *Unfreeze columns* button (id: "unfreeze-cols")
168+
- the *Freeze up to column [id]* (id: "freeze-cols")
169+
- the *Hide column(s) [id]* (id: "hide-cols")
164170
- the **File** block
165171
- the *Export* menuItem (id: "export")
166172
- the *"Microsoft Excel(.xlsx)"* menuItem (id: "export-xlsx")
@@ -234,34 +240,40 @@ spreadsheet.toolbar.data.remove("undo");
234240

235241
The [default menu](/#menu) has the following structure:
236242

237-
- the **File** menuItem (id:"edit")
238-
- the *Export* menuItem (id:"download")
239-
- the *"Microsoft Excel(.xlsx)"* menuItem (id:"export-xlsx")
240-
- the *Import* menuItem (id:"import")
241-
- the *"Microsoft Excel(.xlsx)"* menuItem (id:"import-xlsx")
242-
- the **Edit** menuItem (id:"edit")
243-
- the *Undo* menuItem (id:"undo")
244-
- the *Redo* menuItem (id:"redo")
243+
- the **File** menuItem (id: "edit")
244+
- the *Import as...* menuItem (id: "import")
245+
- the *"Microsoft Excel(.xlsx)"* menuItem (id: "import-xlsx")
246+
- the *Download as...* menuItem (id: "download")
247+
- the *"Microsoft Excel(.xlsx)"* menuItem (id: "export-xlsx")
248+
- the **Edit** menuItem (id: "edit")
249+
- the *Undo* menuItem (id: "undo")
250+
- the *Redo* menuItem (id: "redo")
245251
- the separator
246-
- the *Lock* menuItem (id:"lock")
252+
- the *Freeze* menuItem (id: "freeze")
253+
- the *Unfreeze columns* menuItem (id: "unfreeze-cols")
254+
- the *Freeze up to column [id]* (id: "freeze-cols")
255+
- the separator (id: "freeze-sep")
256+
- the *Unfreeze rows* menuItem (id: "unfreeze-rows")
257+
- the *Freeze up to row [id]* (id: "freeze-rows")
258+
- the *Lock* menuItem (id: "lock")
247259
- the separator
248-
- the *Clear* menuItem (id:"clear")
249-
- the *Clear value* menuItem (id:"clear-value")
250-
- the *Clear styles* menuItem (id:"clear-styles")
251-
- the *Clear all* menuItem (id:"clear-all")
252-
- the **Insert** menuItem (id:"insert")
253-
- the *Columns* menuItem (id:"columns")
254-
- the *Add column* menuItem (id:"add-col")
255-
- the *Remove column* menuItem (id:"remove-col")
256-
- the *Rows* menuItem (id:"rows")
257-
- the *Add row* menuItem (id:"add-row")
258-
- the *Remove row* menuItem (id:"remove-row")
259-
- the *Insert link* menuItem (id:"link")
260-
- the **Format** menuItem (id:"configuration")
261-
- the *Bold* menuItem (id:"font-weight-bold")
262-
- the *Italic* menuItem (id:"font-style-italic")
263-
- the *Underline* menuItem (id:"text-decoration-underline")
264-
- the *Strikethrough* menuItem (id:"text-decoration-line-through")
260+
- the *Clear* menuItem (id: "clear")
261+
- the *Clear value* menuItem (id: "clear-value")
262+
- the *Clear styles* menuItem (id: "clear-styles")
263+
- the *Clear all* menuItem (id: "clear-all")
264+
- the **Insert** menuItem (id: "insert")
265+
- the *Columns* menuItem (id: "columns")
266+
- the *Add column* menuItem (id: "add-col")
267+
- the *Remove column* menuItem (id: "remove-col")
268+
- the *Rows* menuItem (id: "rows")
269+
- the *Add row* menuItem (id: "add-row")
270+
- the *Remove row* menuItem (id: "remove-row")
271+
- the *Insert link* menuItem (id: "link")
272+
- the **Format** menuItem (id: "configuration")
273+
- the *Bold* menuItem (id: "font-weight-bold")
274+
- the *Italic* menuItem (id: "font-style-italic")
275+
- the *Underline* menuItem (id: "text-decoration-underline")
276+
- the *Strikethrough* menuItem (id: "text-decoration-line-through")
265277
- the separator
266278
- the *Horizontal align* menuItem (id: "halign")
267279
- the *Left* menuItem (id: "halign-left")
@@ -274,16 +286,16 @@ The [default menu](/#menu) has the following structure:
274286
- the *Text wrapping* menuItem (id: "multiline")
275287
- the *Clip* menuItem (id: "multiline-clip")
276288
- the *Wrap* menuItem (id: "multiline-wrap")
277-
- the *Format* menuItem (id:"format")
289+
- the *Format* menuItem (id: "format")
278290
- the *Merge/Unmerge* menuItem (id: "merge")
279-
- the **Data** menuItem (id:"data")
280-
- the *Data validation* menuItem (id:"validation")
281-
- the *Search* menuItem (id:"search")
282-
- the *Filter* menuItem (id:"filter")
283-
- the *Sort* menuItem (id:"sort")
284-
- the *Sort A to Z* menuItem (id:"asc-sort")
285-
- the *Sort Z to A* menuItem (id:"desc-sort")
286-
- the **Help** menuItem (id:"help")
291+
- the **Data** menuItem (id: "data")
292+
- the *Data validation* menuItem (id: "validation")
293+
- the *Search* menuItem (id: "search")
294+
- the *Filter* menuItem (id: "filter")
295+
- the *Sort* menuItem (id: "sort")
296+
- the *Sort A to Z* menuItem (id: "asc-sort")
297+
- the *Sort Z to A* menuItem (id: "desc-sort")
298+
- the **Help** menuItem (id: "help")
287299

288300
### Adding controls
289301

@@ -335,22 +347,30 @@ spreadsheet.menu.data.remove("undo");
335347

336348
The [default context menu](/#context-menu) has the following structure:
337349

338-
- the **Lock** menuItem (id:"lock")
339-
- the **Clear** menuItem (id:"clear")
340-
- the *Clear value* menuItem (id:"clear-value")
341-
- the *Clear styles* menuItem (id:"clear-styles")
342-
- the *Clear all* menuItem (id:"clear-all")
343-
- the **Columns** menuItem (id:"columns")
344-
- the *Add column* menuItem (id:"add-col")
345-
- the *Remove column* menuItem (id:"remove-col")
346-
- the *Fit to data* menuItem (id:"fit-col")
347-
- the **Rows** menuItem (id:"rows")
348-
- the *Add row* menuItem (id:"add-row")
349-
- the *Remove row* menuItem (id:"remove-row")
350-
- the **Sort** menuItem (id:"sort")
351-
- the *Sort A to Z* menuItem (id:"asc-sort")
352-
- the *Sort Z to A* menuItem (id:"desc-sort")
353-
- the **Insert link** menuItem (id:"link")
350+
- the **Lock** menuItem (id: "lock")
351+
- the **Clear** menuItem (id: "clear")
352+
- the *Clear value* menuItem (id: "clear-value")
353+
- the *Clear styles* menuItem (id: "clear-styles")
354+
- the *Clear all* menuItem (id: "clear-all")
355+
- the **Columns** menuItem (id: "columns")
356+
- the *Add column* menuItem (id: "add-col")
357+
- the *Remove column* menuItem (id: "remove-col")
358+
- the *Fit to data* menuItem (id: "fit-col")
359+
- the separator
360+
- the *Unfreeze columns* menuItem (id: "unfreeze-cols")
361+
- the *Freeze up to column [id]* menuItem (id: "freeze-cols")
362+
- the *Hide column(s) [id]* menuItem (id: "hide-cols")
363+
- the **Rows** menuItem (id: "rows")
364+
- the *Add row* menuItem (id: "add-row")
365+
- the *Remove row* menuItem (id: "remove-row")
366+
- the separator
367+
- the *Unfreeze rows* menuItem (id: "unfreeze-rows")
368+
- the *Freeze up to row [id]* menuItem (id: "freeze-rows")
369+
- the *Hide row(s) [id]* menuItem (id: "hide-rows")
370+
- the **Sort** menuItem (id: "sort")
371+
- the *Sort A to Z* menuItem (id: "asc-sort")
372+
- the *Sort Z to A* menuItem (id: "desc-sort")
373+
- the **Insert link** menuItem (id: "link")
354374

355375
### Adding controls
356376

docs/localization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ const spreadsheet = new dhx.Spreadsheet("spreadsheet_container");
199199

200200
## Default locale for formulas
201201

202-
The i18n locale for the Spreadsheet popup with formulas is contained in the `dhx.i18n.formulas` object. The default locale for formulas is the following:
202+
The i18n locale for the Spreadsheet popup with descriptions for formulas is contained in the `dhx.i18n.formulas` object. The default locale for formulas is the following:
203203

204204
~~~jsx
205205
const en = {

docs/migration.md

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,55 +8,21 @@ description: You can learn about migration in the documentation of the DHTMLX Ja
88

99
## 5.1 -> 5.2
1010

11-
### toolbarBlocks
12-
13-
In v5.2 the [toolbarBlocks](api/spreadsheet_toolbarblocks_config.md) property is modified in the following way:
14-
15-
- the default set of toolbar options is extended by the new *"cell"* option. It includes the *Border* button and the *Merge* button (previously, it was in the *"align"* block)
16-
- the *"actions"* toolbar block is extended with the *Insert link* button (previously, it was in the *"helpers"* block)
17-
- the *"helpers"* toolbar block is renamed to *"help"* and isn't included in the default set of toolbar options
18-
19-
~~~jsx title="Before v5.2" {9}
20-
// default configuration
21-
toolbarBlocks: [
22-
"undo",
23-
"colors",
24-
"decoration",
25-
"align",
26-
"format",
27-
"actions",
28-
"helpers"
29-
]
30-
~~~
31-
32-
~~~jsx title="From v5.2" {7}
33-
// default configuration
34-
toolbarBlocks: [
35-
"undo",
36-
"colors",
37-
"decoration",
38-
"align",
39-
"cell",
40-
"format",
41-
"actions"
42-
]
43-
~~~
44-
4511
### Freezing/unfreezing functionality
4612

4713
In v5.2 the way of freezing/unfreezing columns and rows has been modified:
4814

4915
- the `leftSplit` and `topSplit` configuration properties that have been used for fixing columns and rows were deprecated
5016
- new API methods `freezeCols()`, `unfreezeCols()`, `freezeRows()`, `unfreezeRows()` and a new action `toggleFreeze` were introduced
5117

52-
~~~jsx title="Before v5.0"
18+
~~~jsx title="Before v5.2"
5319
const spreadsheet = new dhx.Spreadsheet("spreadsheet_container", {
5420
topSplit: 1, // the number of row to "freeze"
5521
leftSplit: 1 // the number of columns to "freeze"
5622
});
5723
~~~
5824

59-
~~~jsx title="From v5.0"
25+
~~~jsx title="From v5.2"
6026
// for rows
6127
spreadsheet.freezeRows("B2"); // the rows up to the second row will be fixed
6228
spreadsheet.freezeRows("sheet2!B2"); // the rows up to the second row in "sheet2" will be fixed

docs/whats_new.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ If you are updating Spreadsheet from an older version, check [Migration to Newer
1010

1111
## Version 5.2
1212

13-
Released on May X, 2025
13+
Released on May 20, 2025
1414

1515
[Review of release on the blog](https://dhtmlx.com/blog/dhtmlx-spreadsheet-5-2/)
1616

@@ -25,24 +25,24 @@ The new release introduces some changes to the `toolbarBlocks` property and the
2525
### New functionality
2626

2727
- Editing cells:
28-
- the ability to create a styled border for a group of cells via UI
28+
- the ability to [create a styled border for a group of cells via UI](data_formatting.md/#styled-borders-for-cells)
2929
- Freezing/unfreezing columns/rows:
30-
- the ability to freeze/unfreeze columns and rows via UI
31-
- the ability to freeze/unfreeze columns and rows via API
32-
- new methods: `freezeCols()`, `unfreezeCols()`, `freezeRows()`, `unfreezeRows()`
33-
- new action: `toggleFreeze`
34-
- new `freeze` property for the *sheets* object of the `parse()` method
30+
- the ability to freeze/unfreeze columns and rows via [UI](work_with_rows_cols.md/#freezingunfreezing-rows-and-columns)
31+
- the ability to freeze/unfreeze columns and rows via [API](working_with_ssheet.md/#freezingunfreezing-rows-and-columns)
32+
- new methods: [`freezeCols()`](api/spreadsheet_freezecols_method.md), [`unfreezeCols()`](api/spreadsheet_unfreezecols_method.md), [`freezeRows()`](api/spreadsheet_freezerows_method.md), [`unfreezeRows()`](api/spreadsheet_unfreezerows_method.md)
33+
- new action: [`toggleFreeze`](api/overview/actions_overview.md/#list-of-actions)
34+
- new `freeze` property for the *sheets* object of the [`parse()`](api/spreadsheet_parse_method.md) method
3535
- Hiding/showing columns/rows:
36-
- the ability to hide/show columns and rows via UI
37-
- the ability to hide/show columns and rows via API
38-
- new methods: `hideCols()`, `showCols()`, `hideRows()`, `showRows()`
39-
- new action: `toggleVisibility`
40-
- new `hidden` property for the *cols* and *rows* configs of the *sheets* object of the `parse()` method
36+
- the ability to hide/show columns and rows via [UI](work_with_rows_cols.md/#hidingshowing-rows-and-columns)
37+
- the ability to hide/show columns and rows via [API](working_with_ssheet.md/#hidingshowing-rows-and-columns)
38+
- new methods: [`hideCols()`](api/spreadsheet_hidecols_method.md), [`showCols()`](api/spreadsheet_showcols_method.md), [`hideRows()`](api/spreadsheet_hiderows_method.md), [`showRows()`](api/spreadsheet_showrows_method.md)
39+
- new action: [`toggleVisibility`](api/overview/actions_overview.md/#list-of-actions)
40+
- new `hidden` property for the *cols* and *rows* configs of the *sheets* object of the [`parse()`](api/spreadsheet_parse_method.md) method
4141
- Working with formulas:
42-
- a popup with descriptions for formulas is added
43-
- a new locale: `formulas` is added
42+
- [popup with descriptions for formulas](functions.md/#popup-with-formula-description) is added
43+
- new locale: [`formulas`](localization.md/#default-locale-for-formulas) is added
4444
- File import:
45-
- a new [`afterDataLoaded`](api/spreadsheet_afterdataloaded_event.md) event is added
45+
- new [`afterDataLoaded`](api/spreadsheet_afterdataloaded_event.md) event is added
4646

4747
### Fixes
4848

@@ -353,7 +353,7 @@ Version 4.3 doesn't bring any breaking changes but introduces a new way of handl
353353
### New functionality
354354

355355
- The ability to add a drop-down list of options into the cells via the [`setValidation()`](api/spreadsheet_setvalidation_method.md) method or via [UI](work_with_cells.md#using-drop-down-lists-in-cells)
356-
- The ability to fix rows on the top of the spreadsheet via the [`topSplit`](api/spreadsheet_topsplit_config.md) property
356+
- The ability to fix rows on the top of the spreadsheet via the `topSplit` property
357357
- The ability to sort data via the [`sortCells()`](api/spreadsheet_sortcells_method.md) method or via [UI](sorting_data.md)
358358
- [The ability to split long text into multiple lines](data_formatting.md#wrap-text-in-a-cell) (*Text wrapping* button is added into the toolbar)
359359
- Significantly extended list of supported [Date, Financial, Math, String functions](functions.md#information-functions) (marked with *added in v4.3* label)
@@ -540,7 +540,7 @@ Released on October 19, 2020
540540

541541
- [Math functions](functions.md)
542542
- [TypeScript Support](using_typescript.md)
543-
- The ability [to freeze columns on the left side of the spreadsheet](configuration.md#frozen-rows-and-columns) via the [leftSplit](api/spreadsheet_leftsplit_config.md) configuration property
543+
- The ability to freeze columns on the left side of the spreadsheet via the `leftSplit` configuration property
544544
- [The Text format for displaying the content of a cell as text is added to default number formats](number_formatting.md#default-number-formats)
545545
- The ability to select multiple scattered ranges of cells by using ["Ctrl+Shift+Left Click"](hotkeys.md#selection) combination
546546

0 commit comments

Comments
 (0)