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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:11:00+00:00 2026-05-12T16:11:00+00:00

I have two list that I load when my app starts. The first one

  • 0

I have two list that I load when my app starts. The first one loads a complete set of data from the database, the second one independently loads a set of associated data from file.
Each list is loaded into a BindingSource and set as the DataSource for their respective combobox. The data is loading just fine.
The issue is that I need to have the second comboBox only display the elements of its list that correspond with the selected value of the first list.
I have attempted to set the value members to the referential bit of data, but cant figure out how to get the comboBoxSettings to only show the the items whose EventID matches the selected item’s EventID from the EventList comboBox.

         //Event List comboBox
        comboBoxEventList.DataSource = _eventSimPresenter.BindingSourceEventList;
        comboBoxEventList.DisplayMember = "DisplayName";
        comboBoxSettings.ValueMember = "EventID";

        //Settings combobox
        comboBoxSettings.DataSource = _eventSimPresenter.BindingSourceUserSettings;
        if (_eventSimPresenter.BindingSourceUserSettings.Count > 0)
        {
            comboBoxSettings.DisplayMember = "EventName";
            comboBoxSettings.ValueMember = "EventID";
        }

thanks!

  • 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-12T16:11:00+00:00Added an answer on May 12, 2026 at 4:11 pm

    You can reate a method in _eventSimPresenter that return a BindingSourceUserSettings by eventId. When the 1st comboBox changes, take the selected eventId and update 2nd comboBox datasource:

        ...
        comboBoxSettings.DataSource =
                  _eventSimPresenter.GetBindingSourceUserSettings(selectedEventId)
        if (_eventSimPresenter.BindingSourceUserSettings.Count > 0)
        {
            comboBoxSettings.DisplayMember = "EventName";
            comboBoxSettings.ValueMember = "EventID";
        }
    

    In other terms, the filtering should be applied to the datasource since it’s not possible to do it via the comboBox.

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

Sidebar

Related Questions

I have two long list, one from a log file that contains lines formatted
I have a list of objects that have two int properties. The list is
We have two lists: a=['1','2','3','4'] b=['2','3','4','5'] How to get a list with elements that
I have a list that has two items: projects and groups. Projects can go
Suppose I have two lists that holds the list of source file names and
I have two threads, a producer thread that places objects into a generic List
I have a list of addresses in two separate tables that are slightly off
I have a function that returns two values in a list. Both values need
I have two list: set lista {5 6} set listb {8 9} and the
In my iPhone app I have two viewControllers: viewController1 has a tableView that shows

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.