Click here to Skip to main content
Click here to Skip to main content

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

Comments and Discussions

General?! PinmemberVladimir_V28-Apr-06 5:48 
QuestionSamples?? PinmemberSteve Maier28-Apr-06 5:09 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.1411023.1 | Last Updated 28 Apr 2006
Article Copyright 2006 by Handshakeit
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid