In your Hierarchical FlexGrid you can use band formatting to specify the display options for a particular Recordset. A band is created for each Recordset in an ADO hierarchical Recordset. For example, when binding a Hierarchical FlexGrid to an ADO hierarchical Recordset that contains Customers and Orders, the Hierarchical FlexGrid initially contains two bands.
You can customize the appearance of your Hierarchical FlexGrid by formatting a band. This enables you to highlight important information among multiple bands. Band elements you can format include column headers, gridlines, colors, and indentation.
When binding to a non-hierarchical Recordset there is only one band, and this band is referred to as Band 0. No other bands are available, because bands are based on the Recordsets in the Command hierarchy.
You can change the way that fields display within a band by changing the band's layout. By default, the fields display horizontally within bands, as in a standard grid.
Horizontal Band Display
Vertical display may cause the band to expand its height to accommodate all fields in the band. Any other bands that display in the Hierarchical FlexGrid also expand, ensuring that all bands are of equal height.
Vertical Band Display
To set band layout
When the band display is horizontal, you can set headers to display in your Hierarchical FlexGrid. The headers display directly above the band, repeating for each band in the Hierarchical FlexGrid. To display only one set of headers for each band, at the top or left of the Hierarchical FlexGrid, use fixed cells instead of headers. See "Customizing Fixed Appearance" (in the topic Customizing Areas of the Hierarchical FlexGrid) for information on fixed cells.
Horizontal Column Headers
You can change the order of columns within a band of your Hierarchical FlexGrid.
To change column order within a band
Band color and gridline information can be set globally or individually. You can modify color and gridlines to highlight important information within your Hierarchical FlexGrid and increase readability. In addition, you can specify whether to display gridlines between cells within a band. Use the following procedure to modify color and gridlines for all bands within your Hierarchical FlexGrid.
Note To change color information for an individual band, you must programmatically perform the change using the BackColorBand property.
To globally modify color and gridlines
Note When using Windows Default colors, the Hierarchical FlexGrid appears in the colors specified in the your Display Control Panel. In addition to changing the Hierarchical FlexGrid property's colors to a standard or Windows default color, you can create your own color definitions by clicking Edit Custom Color and using the resulting Color dialog box.
When displaying bands vertically, you can indent a band a specific number of columns. This enables you to clearly present bands of information to the user. The indented column before each band contains empty, non-working cells. Therefore, the user cannot place focus into these areas. The format characteristics of these cells are defined by the indent formatting properties, such as GridLinesIndent.
See the Vertical Band Display figure in Changing Band Layout, above.
To indent a band
You can format the band of a non-hierarchical Recordset using any of the properties in the Hierarchical FlexGrid's Property Pages dialog box.
A non-hierarchical Recordset contains only one band, Band 0. There are no other bands available because bands are based on the Recordsets in the Command hierarchy.