Help Center

ColHeaderproperty

Specifies whether headers should display for the specified band.

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 ColHeader (BYVAL BandNumber AS LONG) AS ColHeaderSettings
PROPERTY ColHeader (BYVAL BandNumber AS LONG, BYVAL settings AS ColHeaderSettings)
PROPERTY ColHeader () AS ColHeaderSettings
PROPERTY ColHeader (BYVAL settings AS ColHeaderSettings)

Parameters

NameDescription
BandNumberA zero‑based index identifying the band specifies that contains the headers that will show or be hidden. If the band number is omited, band 0 is assumed.
settingsflexColHeaderOn: The headers display for each band.
flexColHeaderOff: No headers display for the band.

Description

Determines whether column headers are displayed for a specific band in the grid.

Remarks

If you are not using data-bound bands, headers are created by setting FixedRows and assigning text to the first row (Row 0).

Alignment: Use ColAlignment(index) to align data, but note that header text (row 0) sometimes requires separate formatting or manual alignment characters.

Examples

' Define Header Row: Set FixedRows = 1 to create a non-scrolling top row. ' Set Header Text: Use the TextMatrix property to assign titles: grid.FixedRows = 1 grid.TextMatrix(0, 0) = "ID" grif.TextMatrix(0, 1) = "Name"

grid.FixedRows = 2 grid.TextMatrix(0, 0) = "Employee" grid.TextMatrix(1, 0) = "ID"

If grid.MouseRow = 0 Then

' Header clicked → perform sorting

End If

Reference