Help Center

BandExpandableproperty

Returns and sets a value that determines whether the row in the current band can be expanded and collapsed. The current band 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 BandExpandable (BYVAL BandNumber AS LONG) AS BOOLEAN
PROPERTY BandExpandable (BYVAL BandNumber AS LONG, BYVAL bExpandable AS BOOLEAN)

Parameters

NameDescription
BandNumberA Long representing the zero-based index of the specific hierarchical band (0 for the parent level, 1 for the first child level, etc.).
bExpandableTrue (Default) enables the expansion/collapse feature for the band; False prevents the user from changing its visibility state.

Description

Returns and sets a value that determines whether the row in the current band can be expanded and collapsed. The current band is defined by the Col and Row properties.

Remarks

This property is an array-based setting indexed by the band number. It allows you to control the "drill-down" capability for each level of nested data independently.

When set to True, the grid displays "+" and "-" icons next to parent records, allowing users to drill down into one-to-many relationships.

This property is only functional when the grid is bound to a hierarchical data source, such as a Shaped Recordset created via the MSDataShape provider.

If set to False, the specified band remains in its current state (either fully expanded or fully collapsed) and the user cannot toggle it.

Example

' Prevents the parent band (Band 0) from being collapsed grid.BandExpandable(0) = False

' Allows the first child level (Band 1) to be expanded/collapsed grid.BandExpandable(1) = True

Reference