Results 1 to 3 of 3

Thread: [2008] Multiple Combos with one list

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Posts
    263

    [2008] Multiple Combos with one list

    Hello, I've got a number of combos in my application each showing the same information. I set the combo's datasource with a list that I get through a (LINQ) query. I want to just run this query once (save on database load) but use the same list throughout the program. The list is actually quite big (a customer list) and I would rather not have 10 copies of it littered throughout memory. My question is, is there a way I can have 5 combos (or two or whatever) each having their list items initialized from the same list but WITHOUT having the selected indices on all of them changing when I change the selectedindex on one of them?

    The situation i am running into now is that when I change the selectedItem on one combo they are all changing and the various events that each one is supposed to trigger are all triggering.

    Is there a way I can initialize multiple datasources from the same list while not actually being tied to the lists position?

    Thanks,
    jerome

  2. #2
    Lively Member
    Join Date
    Jul 2008
    Posts
    107

    Re: [2008] Multiple Combos with one list

    Psychlotron,

    One way to make the comboboxes independent of each other is to assign each combobox a new binding context. For example:

    ComboBox1.BindingContext = New BindingContext

    Do that for each of the comboboxes and then they should be independent.

    Kerry Moorman

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Posts
    263

    Re: [2008] Multiple Combos with one list

    Ok, Thanks KMoorman. I'll give that a try over the weekend.

    -Psychlotron

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width