Click here to Skip to main content
13,087,784 members (79,219 online)
Click here to Skip to main content
Add your own
alternative version


13 bookmarked
Posted 27 Apr 2006

preventing two controls that bound to the same table from sharing same data

, 27 Apr 2006
Rate this:
Please Sign up or sign in to vote.
preventing two controls that bound to the same table from sharing same data
<!-- Article Starts - DO NOT ADD HTML/BODY START TAGS-->


There is a simple problem faced by many developers, when there are two controls on a form which are bound to the same tables. Suppose there are two combobox on a form having same bound tables. If one user selects a value in one of them it will be automatically selected to other control also.

The reason for this is by default all controls share forms bindingcontext, to prevent it simply change the bindingcontext of one of the control to new context

this.comboBox1.BindingContext= new BindingContext();

Hope this Will give som help


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

India India
No Biography provided

You may also be interested in...


Comments and Discussions

General?! Pin
Vladimir_V28-Apr-06 4:48
memberVladimir_V28-Apr-06 4:48 
QuestionSamples?? Pin
Steve Maier28-Apr-06 4:09
memberSteve Maier28-Apr-06 4:09 

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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.170813.1 | Last Updated 28 Apr 2006
Article Copyright 2006 by Handshakeit
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid