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

  • Home
  • SEARCH
  • 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 80101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:14:59+00:00 2026-05-10T21:14:59+00:00

I’ve got a Windows Forms application with two ListBox controls on the same form.

  • 0

I’ve got a Windows Forms application with two ListBox controls on the same form. They both have their SelectionMode set to ‘MultiExtended’.

When I change the selection of one the selection of the other changes.

Now I thought I’d done something stupid with my SelectedIndexChanged handlers so I removed them and re-wrote them from scratch, and got the problem.

So I created a brand new WinForms app and dragged two ListBoxes onto the forms surface.

In the constructor I populated them both with the following.

List<Thing> data = new List<Thing>();  for ( int i = 0; i < 50; i++ ) {         Thing temp = new Thing();         temp.Letters = 'abc ' + i.ToString();         temp.Id = i;         data.Add(temp); }  listBox1.DataSource = data; listBox1.DisplayMember = 'Letters'; listBox1.ValueMember = 'Id';   List<Thing> data2 = new List<Thing>();  for ( int i = 0; i < 50; i++ ) {     Thing temp = new Thing();     temp.Letters = 'abc ' + i.ToString();     temp.Id = i;     data2.Add(temp); }  listBox2.DataSource = data2; listBox2.DisplayMember = 'Letters'; listBox2.ValueMember = 'Id'; 

And then I built and ran the app.

Started selecting some values to see if the symptoms were present. And they were!

This is literally all the code I added to the form,I had not added any event handlers, I have tried it with the SelectionMode set to ‘One’ and ‘MultiExtended’.

Can anyone give me a clue as to why this is happening.

Cheers

  • 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. 2026-05-10T21:15:00+00:00Added an answer on May 10, 2026 at 9:15 pm

    It isn’t the list that stores the current position – it is the CurrencyManager. Any controls (with the same BindingContext) with the same reference as a DataSource will share a CurrencyManager. By using different list instances you get different CurrencyManager instances, and thus separate position.

    You could achieve the same simply by using .ToList(), or creating a new List<T> with the same contents (as per your original post), or by assigning a new BindingContext to one of the controls:

    control.BindingContext = new BindingContext(); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 116k
  • Answers 116k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Don’t redirect but send the 404 status code: header($_SERVER['SERVER_PROTOCOL'].' 404… May 11, 2026 at 10:38 pm
  • Editorial Team
    Editorial Team added an answer LL is usually a more efficient parsing technique than recursive-descent.… May 11, 2026 at 10:38 pm
  • Editorial Team
    Editorial Team added an answer I know you're asking for Win32, but under most *nixes,… May 11, 2026 at 10:38 pm

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.