Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
240
FindByDataValue in UltraComboEditor
posted

To set selectedindex by value I have to use a 2 step process like this or is there a better way?

1st method:

        Dim myValueListItem As ValueListItem = cboFrequency.Items.ValueList.FindByDataValue(FrequencyCode)
        If myValueListItem IsNot Nothing Then
            cboFrequency.SelectedIndex = cboFrequency.FindStringExact(myValueListItem.DisplayText)
        End If

2nd method:

cboFrequency.SelectedIndex = cboFrequency.Items.IndexOf(cboFrequency.Items.

ValueList.FindByDataValue(FrequencyCode))