| Overload | Description |
|---|---|
| GetBandByKey | Returns a Band if the key exists anywhere in the band hierarchy or null if it does not. |
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinDataSource Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ds As UltraDataSource = New UltraDataSource() ' Set the Key of the root band to 'Root'. ds.Band.Key = "Root" ' Add a child band with the key of 'ChildBand'. ds.Band.ChildBands.Add("ChildBand") ' Add a child band to the ChildBand that we just added. ds.Band.ChildBands("ChildBand").ChildBands.Add("GrandChildBand") ' GetBandByKey method can be used to retrieve Debug.WriteLine(ds.GetBandByKey("Root").Key) Debug.WriteLine(ds.GetBandByKey("ChildBand").Key) Debug.WriteLine(ds.GetBandByKey("GrandChildBand").Key) End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinDataSource; using System.Diagnostics; private void button1_Click(object sender, System.EventArgs e) { UltraDataSource ds = new UltraDataSource( ); // Set the Key of the root band to 'Root'. ds.Band.Key = "Root"; // Add a child band with the key of 'ChildBand'. ds.Band.ChildBands.Add( "ChildBand" ); // Add a child band to the ChildBand that we just added. ds.Band.ChildBands["ChildBand"].ChildBands.Add( "GrandChildBand" ); // GetBandByKey method can be used to retrieve Debug.WriteLine( ds.GetBandByKey( "Root" ).Key ); Debug.WriteLine( ds.GetBandByKey( "ChildBand" ).Key ); Debug.WriteLine( ds.GetBandByKey( "GrandChildBand" ).Key ); }
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