Version

MaxBandDepth Property

Gets or sets the max band depth. Grid will load upto MaxBandDepth number of bands. Note that you have to set the MaxBandDepth before binding the UltraGrid.
Syntax
'Declaration
 
Public Property MaxBandDepth As Integer
public int MaxBandDepth {get; set;}
Remarks

Use this property to force the grid to load upto only a certain number of bands. This can come in use where you have a recursive data relation where a table is related to itself and you only want the grid to drill down the band hierarchy only upto a certain level.

Default value for this property is 100 and range is 1-100 inclusive. Throws an ArgumentOutOfRange exception if set to a value below 1 or greater than 100.

Note: You must set the MaxBandDepth before binding the UltraGrid to a data source in order for this property to have any effect.

Example
Following code sets the MaxBandDepth to 2 thus allowing only upto two bands in the UltraGrid.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button20_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button20.Click

      ' Load only upto two descendant bands. So even if the data source has more than 2 level 
      ' deep hierarchy, the UltraGrid will only make use of first two levels and ignore the 
      ' levels deeper than that.
      Me.ultraGrid1.DisplayLayout.MaxBandDepth = 2
      Me.ultraGrid1.SetDataBinding(Me.ultraGrid1.DataSource, "")

  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

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

	// Load only upto two descendant bands. So even if the data source has more than 2 level 
	// deep hierarchy, the UltraGrid will only make use of first two levels and ignore the 
	// levels deeper than that.
	this.ultraGrid1.DisplayLayout.MaxBandDepth = 2;

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

}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also