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-->

Introduction

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


as

this.comboBox1.BindingContext= new BindingContext();


Hope this Will give som help
Handshakeit

License

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

Handshakeit

India India
No Biography provided

Comments and Discussions

 
General?! PinmemberVladimir_V28-Apr-06 4:48 
QuestionSamples?? PinmemberSteve Maier28-Apr-06 4: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 | Mobile
Web01 | 2.8.140709.1 | Last Updated 28 Apr 2006
Article Copyright 2006 by Handshakeit
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid