ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.Bands Property

Gets the number of levels within a hierarchical grid.

[Visual Basic]

Public ReadOnly Property Bands As Integer

[C#]

public int Bands {get;}

[Delphi]

public property Bands: Int32 read get_Bands;

Remarks

When a grid is bound to a master-detail data source, display related groups of hierarchical data using bands. A band is created for each level in a hierarchical recordset, and may consist of entire tables or a just a few selected fields. A band is a virtual representation of a hierarchical recordset; it is not the data itself.

The Bands property is provided for cases where the number of levels in a hierarchical recordset is not known in advance.

Example

The following example uses the Bands property and the ExpandBand method to display all available bands:

·      Visual Basic

       Dim n As Integer

       For n = 0 To Me.C1TrueTDBGrid1.Bands - 1

           Me.C1TrueDBGrid1.ExpandBand(n)

       Next n

·      C#

       int n;

       for ( n = 0 ; n < this.C1TrueTDBGrid1.Bands)

       {

           this.c1TrueDBGrid1.ExpandBand(n);

       }

·      Delphi

       var n: Integer;

       for n := 0 To Self.C1TrueTDBGrid1.Bands - 1 do

         Self.C1TrueDBGrid1.ExpandBand(n);

See Also

C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.