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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:05:36+00:00 2026-05-23T23:05:36+00:00

using mysql I feed combobox2 with selection of combobox1.It works OK. but the problem

  • 0

using mysql I feed combobox2 with selection of combobox1.It works OK. but the problem is the first select seems does not trigger the eventhandler. the second time I do it it will trigger.

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
comboBox1.SelectedValueChanged += new EventHandler(comboBox1_selectedvaluechanged);
}

private void comboBox1_selectedvaluechanged(object sender, EventArgs e)
{
region = comboBox1.SelectedItem.ToString();
values_to_venue();
db.connection.Close();
}

  • 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-05-23T23:05:37+00:00Added an answer on May 23, 2026 at 11:05 pm

    It’s because you’re not creating your event handler until the SelectedIndex of the combobox changes. This is fired alongside SelectedValue changes. Create the event handler in the load method ensuring it is there when the first SelectedValue changes. If you put it in the Load make sure you clean it up with -= in the unload. Or, you can just create it in the constructor and then you won’t need to remove it.

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

Sidebar

Related Questions

MySQL Query works fine using MySQL workbench but produces an error when I am
Currently using MySQL version 5.1.6 This is my first real world build and so
I am parsing an XML feed into a MYSQL table using simplexml_load_file(). Some of
I have a news feed that has been developed using PHP, MySQL, and jQuery.
Using PHP and MySQL. I need to do something similar to how Github does
So, I'm having a problem building a feed-style list of posts efficiently using PHP
I am making rss feed using php and mysql . I pulled publications from
I'm in the making of some kind of activity stream/feed using PHP and MySQL.
Using MySQL should I store time data as an Int which would be the
Using MySQL, How do I import a user defined database function from one db

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.