Help Center

RowExpandedproperty

Specify whether the current row is expanded or collapsed. The current row is defined by the Col and Row properties.

Windowspropertydoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

PROPERTY RowExpanded () AS BOOLEAN
PROPERTY RowExpanded (BYVAL bRowExpanded AS BOOLEAN)

Parameters

NameDescription
bRowExpandedAssigning True expands the current row. Assigning False collapses the current row.

Return value

True: The current row is expanded and its child rows are visible.

False: The current row is collapsed and its child rows are hidden.

Description

Indicates or sets whether the current row is expanded. The current row is defined by the Col and Row properties.

Remarks

This property only has an effect when the MSHFlexGrid is displaying hierarchical data, typically from a SHAPE recordset created with the MSDataShape provider.

When a row is expandable, the grid automatically displays "+" or "-" icons. Setting RowExpanded to True or False programmatically is the equivalent of a user clicking these icons.

For a row to be expandable, the BandExpandable property for its specific level must be set to True

Examples

' Expand the current row grid.RowExpanded = TRUE

' Collapse the current row grid.RowExpanded = FALSE

' Check expansion state If grid.RowExpanded Then

Print "Row is expanded"

End If

' Loop through all rows to expand them grid.Redraw = False ' Prevent flickering For i As Long = 0 To grid.Rows - 1 ' Attempt to expand the row; non-expandable rows will simply be ignored grid.RowExpanded(i) = True Next grid.Redraw = True

Reference