Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8148581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:40:27+00:00 2026-06-06T14:40:27+00:00

I have a ComboBox that is databound to an ObservableCollection of strings . The

  • 0

I have a ComboBox that is databound to an ObservableCollection of strings. The ComboBox is also editable, so you can either enter in your own value or select one from the list. The issue I’m running into is the index of SelectedItem seems to be the index of the last item you selected when you’ve entered in your own value in the ComboBox, though it’s -1 when you have IsTextSearchEnabled set to true.

The problem is, if someone entered their own value and then decide to instead select the item on the ComboBox that had been selected before, the index doesn’t change so the SelectionChange event doesn’t fire. How could I get an event to fire in this situation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:40:28+00:00Added an answer on June 6, 2026 at 2:40 pm

    Test this…
    I hope this helps:

    Dim oldSEL As String = ""
    
    'always checking while you move your mouse over the combobox (when altering selection) and using the keyboard to (alter selection)
    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.MouseMove, ComboBox1.KeyPress
        Dim currentSEL As String = ComboBox1.SelectedText
        If Not (oldSEL = "" And currentSEL = oldSEL) Then
            fire()
            oldSEL = currentSEL
        End If
    End Sub
    
    Private Sub fire()
        Trace.Write("text selected changed")
    End Sub
    

    You should change all the Combobox1 to your liking.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Mildly confused. I have a combobox that is databound to a list of strings.
I have a combobox that is binding to an ObservableCollection of strings in an
I have a combobox that is bound to an observablecollection of strings. The problem
I have a combobox that passes along values in text, but they can have
I have a combobox in my WPF app that is databound to my list
I have a combobox that is bound to ObservableCollection<Item> in the ViewModel. When a
I have a databound dgv that contains combobox columns. When the user selects an
I have a databound ComboBox on my form. Is there any way that I
I have a comboBox that is bound to a list of strings from my
i have comboBox that i fill in data like this: SQL = select DISTINCT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.