Help Center

GridLinesBandproperty

Returns or sets a value that determines the type of lines that are drawn between bands.

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 GridLinesBand (BYVAL BandNumber AS LONG) AS GridLineSettings
PROPERTY GridLinesBand (BYVAL BandNumber AS LONG, BYVAL value AS GridLineSettings)
PROPERTY GridLinesBand () AS GridLineSettings
PROPERTY GridLinesBand (BYVAL value AS GridLineSettings)

Parameters

NameDescription
BandNumberA zero‑based index identifying the band whose background color is being retrieved or modified. If the band number is omited, band 0 is assumed.
valueA Long value or constant that specifies the type of lines drawn, as described in Settings.

Description

Returns or sets the gridline style for a specific band within the hierarchical display.

Remarks

When the GridLinesBand property is set to 1 (flat lines), the color of the lines is determined by the GridColorBand property.

Raised and inset gridlines are always black and white.

Changing the line style triggers a complete repaint of the control. For large grids, set Redraw = False before changing this property.

Unlike the global GridLines property, GridLinesBand is an array property indexed by the band number, allowing you to define different line styles for each level of the data hierarchy.

Hierarchical distinction: It allows for unique visual styling of different nested levels. For example, you might want a parent band to have clear 3D dividers while child bands appear flat and minimalist.

Color control: The color of these lines is determined globally by the GridColor property. You cannot set a unique line color for a single band using this property.

Example

' Sets parent band (Band 0) to raised lines grid.GridLinesBand(0) = flexGridRaised

' Sets first child band (Band 1) to standard flat lines grid.GridLinesBand(1) = flexGridFlat

Reference