[]
        
(Showing Draft Content)

GC.Spread.Sheets.Outlines.Outline

Class: Outline

Sheets.Outlines.Outline

Table of contents

Constructors

Methods

Constructors

constructor

new Outline(count)

Represents an outline (range group) for the worksheet.

Parameters

Name Type Description
count number The number of rows or columns.

Methods

direction

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();

Parameters

Name Type
direction? OutlineDirection

Returns

any

If no value is set, returns the outline's (range group) direction; otherwise, returns the outline.


expand

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();

Parameters

Name Type Description
level number The level of the outline to expand or collapse.
expand boolean Whether to expand the groups.

Returns

void


expandGroup

expandGroup(groupInfo, expand): void

Expands or collapses the specified outline (range group) of rows or columns.

Parameters

Name Type Description
groupInfo OutlineInfo The group information of the range group.
expand boolean Whether to expand the groups.

Returns

void


find

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();

Parameters

Name Type Description
index number The index of the row or column.
level number The level of the outline (range group).

Returns

OutlineInfo

The specified range group.


getCollapsed

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));

Parameters

Name Type Description
index number The index.

Returns

boolean

true if collapsed; otherwise, false.


getLevel

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));

Parameters

Name Type Description
index number The index of the row or column.

Returns

number

The level for the row or column.


getMaxLevel

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());

Returns

number

The number of the deepest level.


getState

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.OutlineInfo.collapsed);
alert(activeSheet.rowOutlines.getState(rgi));
activeSheet.resumePaint();

Parameters

Name Type Description
groupInfo OutlineInfo The group information.

Returns

OutlineState

The group state.


group

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();

Parameters

Name Type Description
index number The group starting index.
count number The number of rows or columns to group.

Returns

void


isCollapsed

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));

Parameters

Name Type Description
index number The index of the row or column in the range group.

Returns

boolean

true if the specified row or column is collapsed; otherwise, false.


isGroupEnd

isGroupEnd(index, processLevel): boolean

Determines whether the specified index is the end of the group.

Parameters

Name Type Description
index number The index.
processLevel number The process level.

Returns

boolean

true if the specfied index is the end of the group; otherwise, false.


refresh

refresh(): void

Refreshes this range group.

Returns

void


resumeAdding

resumeAdding(): void

Resumes the adding.

Returns

void


setCollapsed

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();

Parameters

Name Type Description
index number The index.
collapsed boolean Set to true to collapse the level.

Returns

void


suspendAdding

suspendAdding(): void

Suspends the adding.

Returns

void


ungroup

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();

Returns

void


ungroupRange

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();

Parameters

Name Type Description
index number The group starting index.
count number The number of rows or columns to remove.

Returns

void