Help Center

BandColIndexfunction

Returns the column number of the current cell relative to the band that contains the cell.

Windowsfunctiondoc-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

FUNCTION BandColIndex () AS LONG

Description

Returns the index of a column relative to its specific band (hierarchical level), rather than its absolute position in the entire grid.

Remarks

In a hierarchical grid, a column might be the 10th column overall but the 0th column within "Band 1" (the first child level). BandColIndex provides this local index.

This property is primarily used to identify which logical data field a user has clicked or selected within a specific level of the hierarchy.

It is almost always used in conjunction with the BandLevel property to uniquely identify a cell's location in a multi-band data structure.

Example

Dim localCol As Long Dim currentBand As Long

localCol = grid.BandColIndex currentBand = grid.BandLevel

Print "You clicked column " & STR(localCol) & " in Band " & STR(currentBand)

Reference