Infragistics(R) NetAdvantage(R) Windows Forms
Bands Property
See Also  Example E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace > UltraGridLayout Class : Bands Property

A collection of UltraGridBand objects. When used at the grid level, the collection includes all the UltraGridBand objects in the control.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Bands As BandsCollection
C# 
public BandsCollection Bands {get;}

Example

Following code sets some of the commonly used properties of the UltraCombo in the Form's Load event.

Visual BasicCopy Code
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

      Me.OleDbDataAdapter1.Fill(Me.DataSet11)
      Me.OleDbDataAdapter2.Fill(Me.DataSet11)
      Me.OleDbDataAdapter3.Fill(Me.DataSet11)

      Me.ultraGrid1.SetDataBinding(Me.DataSet11, "")
      
      ' You can set the ScrollTipField to the key of the column key you want the
      ' UltraGrid to display cell values of in the tool-tips that show up when the user
      ' drags the vertical scrollbar thumb.
      Me.UltraGrid1.DisplayLayout.Bands(0).ScrollTipField = "CustomerID"

      ' Ensure that ScrollStyle is Deferred which it is by default otherwise the 
      ' UltraGrid will not display tool-tips mentioned above when the user drags the 
      ' vertical scrollbar thumb.
      Me.UltraGrid1.DisplayLayout.ScrollStyle = ScrollStyle.Deferred

  End Sub
C#Copy Code
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void Form1_Load(object sender, System.EventArgs e)
{

	this.oleDbDataAdapter1.Fill( this.dataSet11 );
	this.oleDbDataAdapter2.Fill( this.dataSet11 );
	this.oleDbDataAdapter3.Fill( this.dataSet11 );

	this.ultraGrid1.SetDataBinding( this.dataSet11, "" );

	// You can set the ScrollTipField to the key of the column key you want the
	// UltraGrid to display cell values of in the tool-tips that show up when the user
	// drags the vertical scrollbar thumb.
	this.ultraGrid1.DisplayLayout.Bands[0].ScrollTipField = "CustomerID";

	// Ensure that ScrollStyle is Deferred which it is by default otherwise the 
	// UltraGrid will not display tool-tips mentioned above when the user drags the 
	// vertical scrollbar thumb.
	this.ultraGrid1.DisplayLayout.ScrollStyle = ScrollStyle.Deferred;

}

Remarks

The Bands collection contains all of the UltraGridBand objects in the grid. Each UltraGridBand object represents a single level of a hierarchical data set.

BandsCollection

See Also