Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Data Binding / May 2006

Tip: Looking for answers? Try searching our database.

Who is bound ? Wich controls are bound

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
andre mens - 21 May 2006 11:08 GMT
Hi

is it possible to see wich controls are bound to a dataset ?

For example is it possible to see that a TextBox is bound to a field in a
datatable of a dataset ?
And i only know of the existense of the DataTable / DataSet

Greetings Andre Mens
Linda Liu [MSFT] - 22 May 2006 05:29 GMT
Hi,

Thank you for posting.

If a control is bound to a datasource at design-time, you could see the
data binding at the DataBindings part in the Properties Window.

If a control is bound to a datasource at run-time, you could not see the
data binding in the Properties Window.  But you could see the data binding
in your code. For example, the code for binding a TextBox to a field of a
datatable may be the following:

this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text",
this.dataSet11, "Persons.PersonID", true));

Hope this is helpful to you.
If you have any other concerns or need anything else, please don't hesitate
to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
andre mens - 23 May 2006 10:14 GMT
Hi Linda (Thx for your response)

Sorry i think i didn't explain enough for what i was trying to ask.

I was wondering if there was a way to see from the the instance of a
BindingSource wich controls are bound to it so they are notified when
something is changed in the data. Al this i want to do in code. So is there
some list available with al subscribers ?
Hope this is making more clear my question

Greetings Andre
Linda Liu [MSFT] - 24 May 2006 02:36 GMT
Hi Andre,

Thank you for your response.

When you bind a control to a data source, an instance of a Binding
representing this data binding will be generated and added to the
DataBindings collection of the control.

You could not see from an instance of a BindingSource which controls are
bound to it.
And there's no list available with all subscribers.  You can only see from
the control which data source it is bound to.

Hope this is helpful to you.

If you have any other concerns or need anything else, please don't hesitate
to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.