Version

RowSelected Event (UltraCombo)

Occurs when the UltraDropDownBase.SelectedRow changes.
Syntax
'Declaration
 
Public Event RowSelected As RowSelectedEventHandler
public event RowSelectedEventHandler RowSelected
Event Data

The event handler receives an argument of type RowSelectedEventArgs containing data related to this event. The following RowSelectedEventArgs properties provide information specific to this event.

PropertyDescription
Owner owner
Row selected row
Remarks

This event fires any time the selected row of the Combo changes. This will also change the Value and Text properties of the control, except in cases where the previously selected row has the same value or text as the new selected row.

It is generally undesirable to do anything in this event that will cause the Combo to lose focus, such as displaying a MessageBox. This is because the event will often fire when the user is in the process of (but has not yet completed) making a change, such as when the user is pressing the arrow keys to navigate through the list, or typing into the edit portion of the combo and using AutoEdit to find a particular item.

Example
Following code shows some of the information available in RowSelected event.

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_RowSelected(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.RowSelectedEventArgs) Handles ultraCombo1.RowSelected

      ' RowSelected gets fired when the user selects an item from the drop down.
      ' Value property of the UltraCombo gets updated. You can also access the row
      ' that was selected by accessing the Row property off the passed in event args.

      Debug.WriteLine("RowSelected: " & "UltraCombo's new value is " & Me.ultraCombo1.Value.ToString())
      Debug.WriteLine("RowSelected: " & "New row is selected with the ProductID of " & e.Row.Cells("ProductID").Value.ToString())

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

private void ultraCombo1_RowSelected(object sender, Infragistics.Win.UltraWinGrid.RowSelectedEventArgs e)
{	

	// RowSelected gets fired when the user selects an item from the drop down.
	// Value property of the UltraCombo gets updated. You can also access the row
	// that was selected by accessing the Row property off the passed in event args.

	Debug.WriteLine( "RowSelected: " + "UltraCombo's new value is " + this.ultraCombo1.Value.ToString( ) );
	Debug.WriteLine( "RowSelected: " + "New row is selected with the ProductID of " + e.Row.Cells["ProductID"].Value.ToString( ) );

}
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