| オーバーロード | 解説 |
|---|---|
| GetBandByKey | キーがバンド階層のどこかに存在する場合はバンドを、存在しない場合には null を返します。 |
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 ); }