Version

SelectedItem Property

Gets/sets the currently selected item. Available only at runtime.
Syntax
'Declaration
 
Public Property SelectedItem As Infragistics.Win.ValueListItem
public Infragistics.Win.ValueListItem SelectedItem {get; set;}
Remarks

The SelectedItem property can be set to an item in the dropdown list; when that happens, the control's edit portion displays that item's text, and the SelectedIndex property returns the index of the item.

The Items collection is a collection of type Infragistics.Win.ValueListItemsCollection.

As such, the SelectedItem property is of type Infragistics.Win.ValueListItem.

Example
This sample finds the string specified, selects it, and highlights it within the list.

Private Sub SelectString(ByVal str As String)

' Attempt to find passed in string.
     Dim index As Integer = Me.UltraComboEditor1.FindString(str)

     If index <> -1 Then
		' String has been found, highlight it. First restore appearance on non
		' highlighted items

         Dim i As Integer
         For i = 0 To Me.UltraComboEditor1.Items.Count - 1
             If i <> index Then
                 Me.UltraComboEditor1.Items(i).Appearance.FontData.Reset()
                 Me.UltraComboEditor1.Items(i).Appearance.ResetBackColor()
             End If
         Next i

		' Highlight the found item in the list
         Dim item As Infragistics.Win.ValueListItem = Me.UltraComboEditor1.Items(index)

         item.Appearance.BackColor = Color.Yellow
         item.Appearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.True

		' Set the selected item
         Me.UltraComboEditor1.SelectedItem = item
     End If
	
 End Sub
private void SelectString(string str)
{

	// Attempt to find passed in string.
	int index = this.ultraComboEditor1.FindString(str);

	if (index != -1)
	{

		// String has been found, highlight it. First restore appearance on non
		// highlighted items
		for(int i = 0; i < this.ultraComboEditor1.Items.Count ; i++)
		{
			if (i != index)
			{
				this.ultraComboEditor1.Items[i].Appearance.FontData.Reset();
				this.ultraComboEditor1.Items[i].Appearance.ResetBackColor();
			}
		}

		// Highlight the found item in the list
		Infragistics.Win.ValueListItem item = this.ultraComboEditor1.Items[index] as Infragistics.Win.ValueListItem;

		item.Appearance.BackColor = Color.Yellow;
		item.Appearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.True ;

		// Set the selected item
		this.ultraComboEditor1.SelectedItem = item;
	}

}
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