GetBandNamefunction
Returns the name of the band.
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 GetBandName (BYVAL BandNumber AS LONG) AS DWSTRING
Parameters
| Name | Description | |
|---|---|---|
BandNumber | The zero‑based index of the band whose name you want to retrieve. |
Description
Returns the name of the specified band.
Remarks
GetBandName returns the display name associated with a band in a hierarchical Recordset. These names originate from the shaped Recordset structure (typically created using the MSDataShape provider). For example, a SHAPE command such as: creates two bands:
- Band 0 → "Customers"
- Band 1 → "Orders"
GetBandName allows you to retrieve these names at runtime, which is especially useful for:
- displaying band names in custom UI elements
- debugging hierarchical structures
- applying formatting rules based on band identity
- dynamically generating captions or tooltips
If the Recordset does not define explicit band names, the control may return an empty string.
Examples
SHAPE {SELECT * FROM Customers} APPEND ({SELECT * FROM Orders} AS Orders) RELATE CustomerID TO CustomerID
Dim bandName As `DWString bandName = grid.GetBandName(1) Print "Band 1 name: "; bandName
Reference
- Documented in Windows/Windows GUI/MSHFlexGrid Class.md
- Topic: Microsoft Hierarchical Grid