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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:32:13+00:00 2026-06-15T10:32:13+00:00

I have 2 listboxes each displaying 2 different lists which are being populated by

  • 0

I have 2 listboxes each displaying 2 different lists which are being populated by user input. I was wondering if I could somehow combine the data in each listbox and show it in a third listbox. This is a windowsForms application in visual Studio. I also want to make sure that it is updated properly when a new value is added into the 2 different listboxes. So far what I have done is combined the two lists that I have as so:

    public List<String> listAll()
    {
        List<String> all = new List<string>();
        all.AddRange(listFirstName());
        all.AddRange(listSecondName());
        return all;
    }

The problem with this is first of all i dont know if this will update when a new value is added to the other two lists. and secondly now that I have this new list i still dont know how to display it in a listbox. keep in mind that i still need to have the other listboxes containing the first 2 lists displayed in the main form along with this new listbox which will contain the values for both of them.

Cheers, any help is welcome and appreciated.

  • 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-15T10:32:14+00:00Added an answer on June 15, 2026 at 10:32 am

    You can have seperate method to populate listBox3. in that method you can clear existing items and add all the items from listBox1 and listBox3.

    when you add items to listBox1 or listBox2 you can call same method after adding items.

    listBox3.Items.Clear();
    listBox3.Items.AddRange(listAll().ToArray());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a need to use two listboxes, each bound to a different collection.
I have two ListBoxes, lstAvailableColors and lstSelectedColors. Between each listbox are two buttons, Add
i have two ListBoxes (in a Silverlight 3 Application), each wrapped with a ListBoxDragDropTarget.
I want a ListBox full of items. Although, each item should have a different
I have 2 listboxes, the first listbox stores data pointers for each items Object
I have two listboxes and two buttons. Each listbox is in its own div
I have two listboxes which I both bind to the same selected index. The
I have a file that I am reading in, splitting up into different lists
I have two separate binding problems with listboxes with an itemtemplate which contains a
I am creating a webpage in which I have a series of pairs ListBoxes

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.