AfterCollapse Event

Fired after the user expands or collapses one or more rows in an outline.

Syntax

Private Sub VSFlexGrid_AfterCollapse( ByVal Row As Long,  ByVal State As Integer)

Remarks

This event is fired when the grid is used in outline mode and the user expands or collapses one or more nodes.

The parameters for the AfterCollapse event are described below:

Row As Long

If a single node is being expanded or collapsed, this parameter has the row number of the node being expanded or collapsed. If multiple nodes are being collapsed or expanded, this parameter is set to -1.

State As Integer

If a single node is being expanded or collapsed, this parameter has the new state of the node. If multiple node are being collapsed or expanded, this parameter is set to the new outline level being displayed.

Possible node states are:

 

Constant

Value

Description

flexOutlineExpanded

0

The node is expanded: all subordinate nodes are visible.

flexOutlineSubtotals

1

The node is partially expanded: subordinates nodes are visible but collapsed.

flexOutlineCollapsed

2

The node is collapsed: all subordinate nodes are hidden.

 

Single nodes are expanded or collapsed when the user clicks the outline tree (see the OutlineBar property) or when a new node state is assigned to the IsCollapsed property of a specific row. Multiple nodes are expanded or collapsed when the user clicks the outline buttons across the top of the outline tree or when the Outline method is invoked by the host application.

See also the BeforeCollapse event.

See Also

VSFlexGrid Control