Skip to content

Commit 54bcb2f

Browse files
committed
[update] docs for grid range selection module
1 parent 36eb5b5 commit 54bcb2f

File tree

8 files changed

+112
-38
lines changed

8 files changed

+112
-38
lines changed

docs/grid/api/rangeselection/afterresetrange_event.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ afterResetRange: (
2424
@params:
2525
The callback of the event is called with the following parameters:
2626

27-
- `range: object` - the object of the reset range:
28-
- `xStart?: string | number` - the starting column id
29-
- `xEnd?: string | number` - the ending column id
30-
- `yStart?: string | number` - the starting row id
31-
- `yEnd?: string | number` - the ending row id
27+
<table>
28+
<tbody>
29+
<tr>
30+
<td><b>range</b></td>
31+
<td>(<i>object</i>) the object with the reset range coordinates that contains the following options:<ul><li><b>`xStart`</b> - (<i>string | number</i>) the starting column id</li><li><b>`xEnd`</b> - (<i>string | number</i>) the ending column id</li><li><b>`yStart`</b> - (<i>string | number</i>) the starting row id</li><li><b>`yEnd`</b> - (<i>string | number</i>) the ending row id</li></ul></td>
32+
</tr>
33+
</tbody>
34+
</table>
3235

3336
@example:
3437
const grid = new dhx.Grid("grid_container", {

docs/grid/api/rangeselection/aftersetrange_event.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ afterSetRange: (
2424
@params:
2525
The callback of the event is called with the following parameters:
2626

27-
- `range: object` - the object of the set range:
28-
- `xStart?: string | number` - the starting column id
29-
- `xEnd?: string | number` - the ending column id
30-
- `yStart?: string | number` - the starting row id
31-
- `yEnd?: string | number` - the ending row id
27+
<table>
28+
<tbody>
29+
<tr>
30+
<td><b>range</b></td>
31+
<td>(<i>object</i>) the object with the set range coordinates that contains the following options:<ul><li><b>`xStart`</b> - (<i>string | number</i>) the starting column id</li><li><b>`xEnd`</b> - (<i>string | number</i>) the ending column id</li><li><b>`yStart`</b> - (<i>string | number</i>) the starting row id</li><li><b>`yEnd`</b> - (<i>string | number</i>) the ending row id</li></ul></td>
32+
</tr>
33+
</tbody>
34+
</table>
3235

3336
@example:
3437
const grid = new dhx.Grid("grid_container", {

docs/grid/api/rangeselection/beforeresetrange_event.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ beforeResetRange: (
2424
@params:
2525
The callback of the event is called with the following parameters:
2626

27-
- `range: object` - the range object:
28-
- `xStart?: string | number` - the starting column id
29-
- `xEnd?: string | number` - the ending column id
30-
- `yStart?: string | number` - the starting row id
31-
- `yEnd?: string | number` - the ending row id
27+
<table>
28+
<tbody>
29+
<tr>
30+
<td><b>range</b></td>
31+
<td>(<i>object</i>) an object with the range coordinates that contains the following options:<ul><li><b>`xStart`</b> - (<i>string | number</i>) the starting column id</li><li><b>`xEnd`</b> - (<i>string | number</i>) the ending column id</li><li><b>`yStart`</b> - (<i>string | number</i>) the starting row id</li><li><b>`yEnd`</b> - (<i>string | number</i>) the ending row id</li></ul></td>
32+
</tr>
33+
</tbody>
34+
</table>
3235

3336
@returns:
3437
Return `false` to prevent resetting of the range; otherwise, `true`.

docs/grid/api/rangeselection/beforesetrange_event.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ beforeSetRange: (
2424
@params:
2525
The callback of the event is called with the following parameters:
2626

27-
- `range: object` - the range object:
28-
- `xStart?: string | number` - the starting column id
29-
- `xEnd?: string | number` - the ending column id
30-
- `yStart?: string | number` - the starting row id
31-
- `yEnd?: string | number` - the ending row id
27+
<table>
28+
<tbody>
29+
<tr>
30+
<td><b>range</b></td>
31+
<td>(<i>object</i>) an object with the range coordinates that contains the following options:<ul><li><b>`xStart`</b> - (<i>string | number</i>) the starting column id</li><li><b>`xEnd`</b> - (<i>string | number</i>) the ending column id</li><li><b>`yStart`</b> - (<i>string | number</i>) the starting row id</li><li><b>`yEnd`</b> - (<i>string | number</i>) the ending row id</li></ul></td>
32+
</tr>
33+
</tbody>
34+
</table>
3235

3336
@returns:
3437
Return `false` to prevent setting a range; otherwise, `true`.

docs/grid/api/rangeselection/getrange_method.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,26 @@ getRange():
2323

2424
@returns:
2525
- an object with the current selection range, where:
26-
- `xStart?: string | number` - the starting column id
27-
- `xEnd?: string | number` - the ending column id
28-
- `yStart?: string | number` - the starting row id
29-
- `yEnd?: string | number` - the ending row id
26+
<table>
27+
<tbody>
28+
<tr>
29+
<td><b>xStart</b></td>
30+
<td>(<i>string | number</i>) the starting column id</td>
31+
</tr>
32+
<tr>
33+
<td><b>xEnd</b></td>
34+
<td>(<i>string | number</i>) the ending column id</td>
35+
</tr>
36+
<tr>
37+
<td><b>yStart</b></td>
38+
<td>(<i>string | number</i>) the starting row id</td>
39+
</tr>
40+
<tr>
41+
<td><b>yEnd</b></td>
42+
<td>(<i>string | number</i>) the ending row id</td>
43+
</tr>
44+
</tbody>
45+
</table>
3046
- `null` if no range is set
3147

3248
@example:

docs/grid/api/rangeselection/getrangedcells_method.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,18 @@ getRangedCells(): { row: object; column: object; }[];
1616

1717
@returns:
1818
- an array of objects where:
19-
- `row: object` - the row object
20-
- `column: object` - the column object
19+
<table>
20+
<tbody>
21+
<tr>
22+
<td><b>row</b></td>
23+
<td>(<i>object</i>) the row object</td>
24+
</tr>
25+
<tr>
26+
<td><b>column</b></td>
27+
<td>(<i>object</i>) the column object</td>
28+
</tr>
29+
</tbody>
30+
</table>
2131

2232
@example:
2333
// this example shows retrieving of the range of selected cells

docs/grid/api/rangeselection/isranged_method.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ isRanged(cell: { x: string | number; y: string | number }): boolean;
1515
~~~
1616

1717
@params:
18-
- `cell: object` - an object with the `x` and `y` coordinates of a cell, where:
19-
- `x: string | number` - the column id
20-
- `y: string | number` - the row id
18+
<table>
19+
<tbody>
20+
<tr>
21+
<td><b>cell</b></td>
22+
<td>(<i>object</i>) - an object with the `x` and `y` coordinates of a cell, where:<ul><li>`x` - (*string | number*) - the column id</li><li>`y` - (*string | number*) - the row id</li></ul></td>
23+
</tr>
24+
</tbody>
25+
</table>
2126

2227
:::note
2328
You can specify just `x` or `y` to check a column or a row, correspondingly.

docs/grid/usage_rangeselection.md

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,17 +225,43 @@ console.log(grid.range.getRange()); // -> { xStart: "a", xEnd: "b", yStart: "1",
225225

226226
The returned object with the current selection range contains the following properties:
227227

228-
- `xStart` - (*string | number*) the starting column id
229-
- `xEnd` - (*string | number*) the ending column id
230-
- `yStart` - (*string | number*) the starting row id
231-
- `yEnd` - (*string | number*) the ending row id
228+
<table>
229+
<tbody>
230+
<tr>
231+
<td><b>xStart</b></td>
232+
<td>(<i>string | number</i>) the starting column id</td>
233+
</tr>
234+
<tr>
235+
<td><b>xEnd</b></td>
236+
<td>(<i>string | number</i>) the ending column id</td>
237+
</tr>
238+
<tr>
239+
<td><b>yStart</b></td>
240+
<td>(<i>string | number</i>) the starting row id</td>
241+
</tr>
242+
<tr>
243+
<td><b>yEnd</b></td>
244+
<td>(<i>string | number</i>) the ending row id</td>
245+
</tr>
246+
</tbody>
247+
</table>
232248

233249
### Getting an array of cells within the range
234250

235251
It is also possible to get an array of cells within the range selection by using the [`getRangedCells()`](grid/api/rangeselection/getrangedcells_method.md) method of the `range` object. It returns an array of objects where:
236252

237-
- `row` - (*object*) the row object
238-
- `column` - (*object*) the column object
253+
<table>
254+
<tbody>
255+
<tr>
256+
<td><b>row</b></td>
257+
<td>(<i>object</i>) the row object</td>
258+
</tr>
259+
<tr>
260+
<td><b>column</b></td>
261+
<td>(<i>object</i>) the column object</td>
262+
</tr>
263+
</tbody>
264+
</table>
239265

240266
This example shows retrieving of the range of selected cells:
241267

@@ -261,9 +287,14 @@ console.log(grid.range.getRangedCells()); // -> [{ row: { id: "1", ... }, column
261287

262288
You can check whether a cell is within the current range using the [`isRanged()`](grid/api/rangeselection/isranged_method.md) method of the `range` object. The method takes the following parameter:
263289

264-
- `cell` - (*object*) - an object with the `x` and `y` coordinates of a cell, where:
265-
- `x` - (*string | number*) - the column id
266-
- `y` - (*string | number*) - the row id
290+
<table>
291+
<tbody>
292+
<tr>
293+
<td><b>cell</b></td>
294+
<td>(<i>object</i>) - an object with the `x` and `y` coordinates of a cell, where:<ul><li>`x` - (*string | number*) - the column id</li><li>`y` - (*string | number*) - the row id</li></ul></td>
295+
</tr>
296+
</tbody>
297+
</table>
267298

268299
:::note
269300
You can specify just `x` or `y` to check a column or a row, correspondingly.

0 commit comments

Comments
 (0)