[]
• new Outline(count
)
Represents an outline (range group) for the worksheet.
Name | Type | Description |
---|---|---|
count |
number |
The number of rows or columns. |
▸ direction(direction?
): any
Gets or sets the outline's (range group) direction.
example
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(3,2);
activeSheet.columnOutlines.group(4,1);
activeSheet.rowOutlines.direction(GC.Spread.Sheets.Outlines.OutlineDirection.forward);
activeSheet.resumePaint();
Name | Type |
---|---|
direction? |
OutlineDirection |
any
If no value is set, returns the outline's (range group) direction; otherwise, returns the outline.
▸ expand(level
, expand
): void
Expands all outlines (range groups), using the specified level.
example
//This example uses the expand method.
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(0,5);
activeSheet.rowOutlines.expand(0,false);
activeSheet.resumePaint();
Name | Type | Description |
---|---|---|
level |
number |
The level of the outline to expand or collapse. |
expand |
boolean |
Whether to expand the groups. |
void
▸ expandGroup(groupInfo
, expand
): void
Expands or collapses the specified outline (range group) of rows or columns.
example
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(2, 5);
var groupInfo = activeSheet.rowOutlines.find(2, 0);
activeSheet.rowOutlines.expandGroup(groupInfo, false);
activeSheet.resumePaint(); // the group is created and collapsed now.
activeSheet.rowOutlines.expandGroup(groupInfo, true); // the group and expand now.
Name | Type | Description |
---|---|---|
groupInfo |
OutlineInfo |
The group information of the range group. |
expand |
boolean |
Whether to expand the groups. |
void
▸ find(index
, level
): OutlineInfo
Gets the outline (range group) with the specified group level and row or column index.
example
//This example uses the find method.
activeSheet.rowOutlines.group(0,5);
var rgi = activeSheet.rowOutlines.find(1, 0);
rgi.state(GC.Spread.Sheets.Outlines.OutlineState.collapsed);
spread.invalidateLayout();
spread.repaint();
Name | Type | Description |
---|---|---|
index |
number |
The index of the row or column. |
level |
number |
The level of the outline (range group). |
The specified range group.
▸ getCollapsed(index
): boolean
Gets the collapsed internal.
example
//This example uses the getCollapsed method.
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(0,5);
activeSheet.rowOutlines.expand(0,true);
activeSheet.resumePaint();
alert(activeSheet.rowOutlines.isCollapsed(0));
Name | Type | Description |
---|---|---|
index |
number |
The index. |
boolean
true
if collapsed; otherwise, false
.
▸ getLevel(index
): number
Gets the level of a specified row or column. The level's index is zero-based.
example
//This example uses the getLevel method.
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(0,5);
activeSheet.rowOutlines.expand(0,true);
activeSheet.resumePaint();
alert(activeSheet.rowOutlines.getLevel(0));
Name | Type | Description |
---|---|---|
index |
number |
The index of the row or column. |
number
The level for the row or column.
▸ getMaxLevel(): number
Gets the number of the deepest level.
remarks
The level index is zero-based.
example
//This example uses the getMaxLevel method.
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(0,5);
activeSheet.rowOutlines.group(1,4);
activeSheet.rowOutlines.expand(0,true);
activeSheet.columnOutlines.group(0,1);
activeSheet.resumePaint();
alert(activeSheet.rowOutlines.getMaxLevel());
number
The number of the deepest level.
▸ getState(groupInfo
): OutlineState
Gets the state for the specified group.
example
//This example uses the getState method.
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(0,5);
var rgi = activeSheet.rowOutlines.find(1, 0);
rgi.state(GC.Spread.Sheets.Outlines.OutlineState.collapsed);
alert(activeSheet.rowOutlines.getState(rgi));
activeSheet.resumePaint();
Name | Type | Description |
---|---|---|
groupInfo |
OutlineInfo |
The group information. |
The group state.
▸ group(index
, count
): void
Groups a range of rows or columns into an outline (range group) from a specified start index.
example
//This example uses the group method.
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(0,5);
activeSheet.rowOutlines.expand(0,false);
activeSheet.resumePaint();
Name | Type | Description |
---|---|---|
index |
number |
The group starting index. |
count |
number |
The number of rows or columns to group. |
void
▸ isCollapsed(index
): boolean
Determines whether the range group at the specified index is collapsed.
example
//This example uses the isCollapsed method.
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(0,5);
activeSheet.rowOutlines.expand(0,true);
activeSheet.resumePaint();
alert(activeSheet.rowOutlines.isCollapsed(0));
Name | Type | Description |
---|---|---|
index |
number |
The index of the row or column in the range group. |
boolean
true
if the specified row or column is collapsed; otherwise, false
.
▸ isGroupEnd(index
, processLevel
): boolean
Determines whether the specified index is the end of the group.
example
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(2, 5);
activeSheet.rowOutlines.group(3, 2);
activeSheet.resumePaint();
console.log(activeSheet.rowOutlines.isGroupEnd(2, 0)); // false
console.log(activeSheet.rowOutlines.isGroupEnd(4, 0)); // false
console.log(activeSheet.rowOutlines.isGroupEnd(4, 1)); // true
console.log(activeSheet.rowOutlines.isGroupEnd(6, 0)); // true
Name | Type | Description |
---|---|---|
index |
number |
The index. |
processLevel |
number |
The process level. |
boolean
true
if the specified index is the end of the group; otherwise, false
.
▸ refresh(): void
Refreshes this range group.
void
▸ resumeAdding(): void
Resumes the adding group when the row/column is inserting the group range.
example
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(2, 5);
activeSheet.resumePaint();
console.log(activeSheet.rowOutlines.find(3, 0).end); // 6
console.log(activeSheet.rowOutlines.find(5, 0).end); // 6
activeSheet.addRows(4, 1);
console.log(activeSheet.rowOutlines.find(3, 0).end); // 7
console.log(activeSheet.rowOutlines.find(5, 0).end); // 7
activeSheet.rowOutlines.suspendAdding();
activeSheet.addRows(4, 1);
console.log(activeSheet.rowOutlines.find(3, 0).end); // 3 // cause adding suspended, the group spilt into two parts.
console.log(activeSheet.rowOutlines.find(5, 0).end); // 8
activeSheet.rowOutlines.resumeAdding();
void
▸ setCollapsed(index
, collapsed
): void
Sets the collapsed level.
example
//This example uses the setCollapsed method.
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(0,5);
activeSheet.rowOutlines.setCollapsed(0,false);
activeSheet.resumePaint();
Name | Type | Description |
---|---|---|
index |
number |
The index. |
collapsed |
boolean |
Set to true to collapse the level. |
void
▸ suspendAdding(): void
Suspends the adding group when the row/column is inserting the group range.
example
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(2, 5);
activeSheet.resumePaint();
console.log(activeSheet.rowOutlines.find(3, 0).end); // 6
console.log(activeSheet.rowOutlines.find(5, 0).end); // 6
activeSheet.addRows(4, 1);
console.log(activeSheet.rowOutlines.find(3, 0).end); // 7
console.log(activeSheet.rowOutlines.find(5, 0).end); // 7
activeSheet.rowOutlines.suspendAdding();
activeSheet.addRows(4, 1);
console.log(activeSheet.rowOutlines.find(3, 0).end); // 3 // cause adding suspended, the group spilt into two parts.
console.log(activeSheet.rowOutlines.find(5, 0).end); // 8
activeSheet.rowOutlines.resumeAdding();
void
▸ ungroup(): void
Removes all outlines (range groups).
example
//This example uses the ungroup method.
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(0,5);
activeSheet.rowOutlines.ungroup();
activeSheet.resumePaint();
void
▸ ungroupRange(index
, count
): void
Removes a range of rows or columns from the outline (range group) at the specified start index.
example
//This example uses the ungroupRange method.
activeSheet.suspendPaint();
activeSheet.rowOutlines.group(0,5);
activeSheet.rowOutlines.ungroupRange(0,1);
activeSheet.resumePaint();
Name | Type | Description |
---|---|---|
index |
number |
The group starting index. |
count |
number |
The number of rows or columns to remove. |
void