Version

CellListSelect Event

Occurs when the user selects an item from a cell's dropdown list.
Syntax
'Declaration
 
Public Event CellListSelect As CellEventHandler
public event CellEventHandler CellListSelect
Event Data

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

PropertyDescription
Cell Returns a reference to the cell of interest.
Remarks

The cell argument returns a reference to an UltraGridCell object that can be used to set properties of, and invoke methods on, the cell that had an item selected. You can use this reference to access any of the returned cell's properties or methods.

This event is generated when an item is selected from the cell's dropdown list. A dropdown list item is considered selected when the user clicks it or highlights it when navigating the list using navigation keys.

This event is only generated for a cell whose column's Style property is set to 4 (StyleDropDown), 5 (StyleDropDownList), 6 (StyleDropDownValidate), or 8 (StyleDropDownCalendar).

Example
Following code shows some of the information available in CellListSelect 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
Imports System.Diagnostics

   Private Sub UltraGrid1_CellListSelect(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles ultraGrid1.CellListSelect

       ' CellListSelect gets fired when an item from a drop down is selected when editing
       ' a cell. Cell would have to be in edit mode for this to get fired. Following code
       ' prints out the selected item idex for value list drop downs.
       If Not Nothing Is e.Cell.Column.ValueList Then
           Dim itemIdex As Integer = e.Cell.Column.ValueList.SelectedItemIndex
           Debug.WriteLine("Selected Item Index = " & itemIdex)
       End If

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

private void ultraGrid1_CellListSelect(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{

	// CellListSelect gets fired when an item from a drop down is selected when editing
	// a cell. Cell would have to be in edit mode for this to get fired. Following code
	// prints out the selected item idex for value list drop downs.
	if ( null != e.Cell.Column.ValueList )
	{
		int itemIdex = e.Cell.Column.ValueList.SelectedItemIndex;

		Debug.WriteLine( "Selected Item Index = " + itemIdex );
	}

}
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