Results 1 to 2 of 2

Thread: Multiple combo boxes with the same list

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    1

    Multiple combo boxes with the same list

    Hi,

    I want to have multiple combo boxes on a form all using the same data list. Obviously I don't want to type the information in for every combo box.

    What is the best way to do this.
    Visual Studio 2005/.NET Framework 2.0

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Multiple combo boxes with the same list

    Put the data in an array or collection and assign that to the DataSource of each ComboBox. If you want to be able to change the items for individual ComboBoxes then instead of assigning the array to the DataSource you can pass it to Items.AddRange.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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