Version

OnValueChanged Method

Called when the Value property changes
Syntax
'Declaration
 
Protected Overridable Sub OnValueChanged( _
   ByVal e As EventArgs _
) 
protected virtual void OnValueChanged( 
   EventArgs e
)

Parameters

e
Example
Following code prints out the display text of the current selected item every time value inside the ultraCombo1 changes.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

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 gets fired whenever a new item is selected or text
      ' is modified so that there is no item selected when there was one
      ' previously.
      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 gets fired whenever a new item is selected or text
	// is modified so that there is no item selected when there was one
	// previously.

	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  );
	}

}
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