Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub UltraCombo1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ultraCombo1.ValueChanged ' 新しい項目が選択されたか、項目が選択されないように ' テキストを変更された場合に ' ValueChanged を発生します Dim vl As IValueList = Me.ultraCombo1 If vl.SelectedItemIndex < 0 Then Debug.WriteLine("ValueChanged: " & "No item has been selected.") Else Dim text As String = vl.GetText(vl.SelectedItemIndex) Debug.WriteLine("ValueChanged: " & "The new selected item is " & text) End If End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void ultraCombo1_ValueChanged(object sender, System.EventArgs e) { // 新しい項目が選択されたか、項目が選択されないように // テキストを変更された場合に // ValueChanged を発生します IValueList vl = this.ultraCombo1; if ( vl.SelectedItemIndex < 0 ) { Debug.WriteLine( "ValueChanged: " + "No item has been selected." ); } else { string text = vl.GetText( vl.SelectedItemIndex ); Debug.WriteLine( "ValueChanged: " + "The new selected item is " + text ); } }