Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 21st, 2005, 12:09 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default Multiple combo boxes, one data set.

Hey all,

I am new to vb.NET, I have been doing ASP.NET(with VB) for a couple of years and this is my first windows app and I notice there are some differences.
The problem that I am having is that I fill a data set which has multiple tables, no problem with that. One of the tables contains colors for example. I have 5 combo boxes that bind to that colors table. The problem is that when I change the selection in one of the combo boxes, they ALL change to the same value? Why is this, how do I get around it? I am confused because ASP.NET does now behave this way
Reply With Quote
  #2 (permalink)  
Old March 22nd, 2005, 10:34 AM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Someone, anyone? Anyone have any idea? Can anyone explain why the combo boxes behave this way?

Reply With Quote
  #3 (permalink)  
Old March 22nd, 2005, 10:40 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

i dont know if this is true, but when you bound a combo to a dataset if you move one combo it will move the record position of the dataset, that will cause the other combo to move..

could be it???

HTH

Gonzalo
Reply With Quote
  #4 (permalink)  
Old March 22nd, 2005, 10:54 AM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Ok, that makes sense.

However is there any work around so that the combo boxes are independent?
Reply With Quote
  #5 (permalink)  
Old March 22nd, 2005, 11:08 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

using there not bounded????

HTH

Gonzalo
Reply With Quote
  #6 (permalink)  
Old March 23rd, 2005, 10:00 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

For many of my applications I don't bind my comboboxes to my datasets. This is my personal preference and I am not saying that binding is not a good option. Instead I loop through the items in the dataset and add them to the combobox.

I have had some strange experiences when binding comboboxes, so I prefer the flexibility of just adding them and manipulating them without binding.

As such, I don't have the problem that you are referring to about all comboboxes changing when one is changed and I use one dataset with multiple tables.

J
Reply With Quote
  #7 (permalink)  
Old March 23rd, 2005, 10:39 AM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Thanks. I will try your way next time.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying data in a tree view from combo boxes Gini Visual Studio 2008 0 June 25th, 2008 01:52 AM
Subform Filter using Multiple Combo boxes natwong BOOK: Expert One-on-One Access Application Development 0 November 13th, 2006 03:07 PM
3 combo boxes ttkt Beginning PHP 0 July 2nd, 2005 02:20 PM
Using Multiple Combo Boxes with Report Viewer izzop Crystal Reports 0 February 9th, 2005 07:34 AM
one record set multiple data sources jack1234 Classic ASP Professional 1 October 17th, 2003 12:50 PM



All times are GMT -4. The time now is 07:16 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.