Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 21st, 2005, 12:09 PM
Friend of Wrox
 
Join Date: Nov 2003
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
 
Old March 22nd, 2005, 10:34 AM
Friend of Wrox
 
Join Date: Nov 2003
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?

 
Old March 22nd, 2005, 10:40 AM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old March 22nd, 2005, 10:54 AM
Friend of Wrox
 
Join Date: Nov 2003
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?
 
Old March 22nd, 2005, 11:08 AM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old March 23rd, 2005, 10:00 AM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old March 23rd, 2005, 10:39 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Thanks. I will try your way next time.






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





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