Click here to Skip to main content
15,887,027 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionVS 2003 to VS 2008 - Can not load type library Pin
No-e30-Jul-09 7:32
No-e30-Jul-09 7:32 
AnswerRe: VS 2003 to VS 2008 - Can not load type library Pin
Dave Kreskowiak30-Jul-09 7:53
mveDave Kreskowiak30-Jul-09 7:53 
GeneralRe: VS 2003 to VS 2008 - Can not load type library Pin
No-e30-Jul-09 8:15
No-e30-Jul-09 8:15 
GeneralRe: VS 2003 to VS 2008 - Can not load type library Pin
Dave Kreskowiak30-Jul-09 9:17
mveDave Kreskowiak30-Jul-09 9:17 
QuestionBinding 2 ComboBoxes within the same form to a single data source Pin
Jay Royall30-Jul-09 5:28
Jay Royall30-Jul-09 5:28 
AnswerRe: Binding 2 ComboBoxes within the same form to a single data source [modified] Pin
Dave Kreskowiak30-Jul-09 6:10
mveDave Kreskowiak30-Jul-09 6:10 
GeneralRe: Binding 2 ComboBoxes within the same form to a single data source [modified] Pin
Jay Royall30-Jul-09 22:04
Jay Royall30-Jul-09 22:04 
GeneralRe: Binding 2 ComboBoxes within the same form to a single data source Pin
Dave Kreskowiak31-Jul-09 4:28
mveDave Kreskowiak31-Jul-09 4:28 
Not really. I only use it when I've got multiple controls that need to see and navigate a single datasource independant of other controls.

Think of it this way. Every control on a form using the same datasource also uses the same binding manager. The binding manager maintain a currency manager (which has nothing to do with money!) which keeps track of which record is the current record all of the controls are looking at. When one control changes the current record, all the controls get pointed at the new current record.

The BindingSource class lets you escape that model and sets up another, seperate set of binding objects that does the same thing, independant of the first, or default set.

In your case, technically, you don't need two BindingSource objects. You only need one. I just used two objects for better code readability. What's easier to understand??
Dim bs As New BindingSource

bs.DataSource = data

ComboBox1.DataSource = data
ComboBox2.DataSource = bs

or
Dim bs1 As New BindingSource
Dim bs2 as New BindingSource

bs1.DataSource = data
bs2.DataSource = data

ComboBox1.DataSource = bs1
ComboBox2.DataSource = bs2

They work exactly the same...


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008
But no longer in 2009...




GeneralRe: Binding 2 ComboBoxes within the same form to a single data source Pin
Jay Royall31-Jul-09 4:52
Jay Royall31-Jul-09 4:52 
QuestionHelp with windows progress bar Pin
xx77abs30-Jul-09 3:55
xx77abs30-Jul-09 3:55 
AnswerRe: Help with windows progress bar Pin
Henry Minute30-Jul-09 5:13
Henry Minute30-Jul-09 5:13 
GeneralRe: Help with windows progress bar Pin
xx77abs30-Jul-09 5:20
xx77abs30-Jul-09 5:20 
GeneralRe: Help with windows progress bar Pin
Henry Minute30-Jul-09 5:32
Henry Minute30-Jul-09 5:32 
AnswerRe: Help with windows progress bar Pin
Moreno Airoldi30-Jul-09 5:29
Moreno Airoldi30-Jul-09 5:29 
GeneralRe: Help with windows progress bar Pin
xx77abs30-Jul-09 5:33
xx77abs30-Jul-09 5:33 
GeneralRe: Help with windows progress bar Pin
Moreno Airoldi30-Jul-09 5:43
Moreno Airoldi30-Jul-09 5:43 
GeneralRe: Help with windows progress bar Pin
DaveyM6930-Jul-09 6:20
professionalDaveyM6930-Jul-09 6:20 
QuestionNeed quick resolution solution - going from 1280x768 to 800x600 Pin
Hypermommy30-Jul-09 3:02
Hypermommy30-Jul-09 3:02 
AnswerRe: Need quick resolution solution - going from 1280x768 to 800x600 Pin
Moreno Airoldi30-Jul-09 3:15
Moreno Airoldi30-Jul-09 3:15 
AnswerRe: Need quick resolution solution - going from 1280x768 to 800x600 Pin
Johan Hakkesteegt30-Jul-09 3:22
Johan Hakkesteegt30-Jul-09 3:22 
AnswerRe: Need quick resolution solution - going from 1280x768 to 800x600 Pin
Dave Kreskowiak30-Jul-09 6:06
mveDave Kreskowiak30-Jul-09 6:06 
GeneralRe: Need quick resolution solution - going from 1280x768 to 800x600 Pin
Hypermommy30-Jul-09 6:19
Hypermommy30-Jul-09 6:19 
GeneralRe: Need quick resolution solution - going from 1280x768 to 800x600 Pin
Dave Kreskowiak30-Jul-09 6:23
mveDave Kreskowiak30-Jul-09 6:23 
QuestionSelect Query from different Databases ? Pin
Paramu197330-Jul-09 2:28
Paramu197330-Jul-09 2:28 
AnswerRe: Select Query from different Databases ? Pin
Johan Hakkesteegt30-Jul-09 2:44
Johan Hakkesteegt30-Jul-09 2:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.