Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Binding + Controls
Message
 
To
17/02/2008 17:48:39
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01292720
Message ID:
01293325
Views:
28
BINGO!!!!!

Your third paragraph is exactly what I did NOT know!!!!! DataSets and tables, upon instantiation are bound to the form? I thought I had to be explicit with binding?

I did not know that "As soon as you instantiate a DataTable or DataSet on a Form or Control, that DataTable or DataSet gets automatically added to the Form's or Control's BindingContext." I have missed this in the documentation, seriously Bonnie, the .NET documentation is faulty at best in many, many areas.

MacDonald's explanation is on p. 273, section "Binding to Any Control (Simple Binding)" and it states;

"Programmers who are familiar with traditional data binding will probably expect that they need to add specialized navigation controls to the form. This isn't the case. Instead, you have two options--controlling navigation programmatically (which is described later) or adding another control that uses complex binding to provide navigation."

The last few words says that adding a control with complex binding (i.e. DataSource) will do the binding for you. Bingo - automatic binding. As I stated, I did not know this would happen, the .NET documentation fails me (you'll agree) and this threw me for a whole day!

>>>>>I'd love to see if you can reproduce it with something you can post here. That would be a great exercise for you too, to try and understand how this all works.

>>>>>>I'd like to see what's written in MacDonald's book too (page numbers are ok ... but I'm not going to run right out and buy the book just to read this chapter <g>).

>>>>>>>>One more thing I'd like to mention about how the "navigation" gets set up. As soon as you instantiate a DataTable or DataSet on a Form or Control, that DataTable or DataSet gets automatically added to the Form's or Control's BindingContext. If you then use that same DataTable as a DataSource in a Combo or whatever, then the use of that Combo changes the .Postion of that particular BindingContext.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform