IsCollapsed Property

Returns or sets whether an outline row is collapsed or expanded.

Syntax

[form!]VSFlexGrid.IsCollapsed(Row As Long)[ = CollapsedSettings ]

Remarks

This property is used when the grid is in outline mode. It allows you to expand or collapse outline nodes through code. If the OutlineBar property is set to a non-zero value, the user can also collapse and expand nodes with the mouse.

The settings for the IsCollapsed property are described below:

 

Constant

Value

Description

FlexOutlineExpanded

0

Show all child nodes.

FlexOutlineSubtotals

1

Show child nodes but collapse them.

FlexOutlineCollapsed

2

Hide all child nodes.

 

When a node is collapsed or expanded, the control fires the BeforeCollapse and AfterCollapse events. You may trap these events to prevent certain nodes from being collapsed or expanded, or to populate the outline asynchronously. See the BeforeCollapse event for an example.

Setting the IsCollapsed property for a row that is not an outline node applies the setting to the row's parent node. If a row has no parent node, an Invalid Index error will occur.

For more details on creating and using outlines, see the Outline Demo.

Data Type

CollapsedSettings (Enumeration)

See Also

VSFlexGrid Control