When the user selects an item from, the value is set based on the UltraDropDownBase.ValueMemberResolved property.
When the user enters text into the combo, the list is searched based on the UltraDropDownBase.DisplayMemberResolved property. If a matching string is found in the UltraDropDownBase.DisplayMemberResolved column, the Value of the combo is the value of the UltraDropDownBase.ValueMemberResolved column in the same row. If the text entered in the combo does not match any item on the list, then the value will return the displayed Text.
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click ' Value property returns the value of the ValueMember field in the currently ' selected item in the UltraCombo. If Me.ultraCombo1.Value Is DBNull.Value Then ' If Value is DBNull, then no item is selected. Debug.WriteLine("No item has been selected.") Debug.WriteLine("Text = " & Me.ultraCombo1.Text) Else ' Print out the value and the text. Debug.WriteLine("Value = " & Me.ultraCombo1.Value.ToString()) Debug.WriteLine("Text = " & Me.ultraCombo1.Text) End If End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void button1_Click(object sender, System.EventArgs e) { // Value property returns the value of the ValueMember field in the currently // selected item in the UltraCombo. if ( this.ultraCombo1.Value == DBNull.Value ) { // If Value is DBNull, then no item is selected. Debug.WriteLine( "No item has been selected." ); Debug.WriteLine( "Text = " + this.ultraCombo1.Text ); } else { // Print out the value and the text. Debug.WriteLine( "Value = " + this.ultraCombo1.Value.ToString( ) ); Debug.WriteLine( "Text = " + this.ultraCombo1.Text ); } }
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