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 8307195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:28:41+00:00 2026-06-08T18:28:41+00:00

I wrote a code that whenever the user picks a value from the drop-down

  • 0

I wrote a code that whenever the user picks a value from the drop-down comboBox, their choice becomes the first item (index 0) of the collection.

Example

BEFORE

[_ MyComboBox _][v]

     |Dog
     |Tree
     |House

USER CLICKS “Tree”

AFTER

[_ MyComboBox _][v]

     |Tree
     |Dog
     |House

The problem is that after this operation, even though everything works fine, the comboBox remains blank and the user has no clue about what they’ve done.

But if I do as everyone suggests, that is MyComboBox.SelectedIndex = 0; it triggers an inifinite loop since I’d be calling it from inside the event handler MyComboBox_SelectedIndexChanged(…)

I also tried MyComboBox.Text = string_that_contains_what_I_want_to_display; but it triggers BOTH SelectedIndexChanged AND SelectedValueChanged.

Frankly I cannot understand why even switching from items with the same value, BOTH index and value are triggered. As far as I understand, SelectedValueChanged should only be triggered when the two items have different content.

I’d be thankful to anyone that will help me get out of this puzzle.

I just need to show the result of the sort operation in the program interface, after it’s done. I could reload the whole page containing my control: it would work, but that wouldn’t be very efficient.

  • 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-08T18:28:42+00:00Added an answer on June 8, 2026 at 6:28 pm

    Use the SelectionChangeCommitted event instead of SelectionChange. The SelectionChangeCommitted event is only fired when the user makes a change rather than when your program makes the change for it.

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

Sidebar

Related Questions

I wrote some code that activity starts a service to get some text from
I need to write a java code that watches the applications. Whenever the user
I recently wrote code that didnt work as i would expect, it was: message
I wrote this code that compiles on Solaris gcc it works fine too for
So, here's the problem. I wrote a code that opens a div based on
Years ago, I wrote a code template that took a few simple parameters (points)
I wrote some code in VHDL that is expected to look at a rotory
I wrote this piece of code that is supposed to redirect something written on
I have some python code that I wrote to convert a python list into
I was thinking about a code that I wrote a few years ago in

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.