Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Binding + Controls
Message
From
17/02/2008 16:30:15
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01292720
Message ID:
01293294
Views:
27
Derek,

OK, yes, my example was simplified. I said as much in my post.

So, you have a Customer table and a SalesPerson table. If the salesperson_combo has the SalesPerson table as it's datasource, then yes, any other controls (textboxes or whatever) that is databound to that same SalesPerson table will be affected by what "row" the salesperson_combo is on (the BindingContext[SalesPerson].Position of the salesperson_combo.DataSource). This is why I said you must use a Copy of the SalesPerson table for the DataSource of the salesperson_combo. You do that and you will not have any problems ... because then there will be one BindingContext for the SalesPerson table, which all your other controls are bound to, and there will be a different BindingContext for the salesperson_combo, since you used a Copy of the table.

You said that you had tried that (using a copy) and it didn't work and that is one reason I wanted to see your code ... because it should have worked just fine. Since you say it didn't work, then something else is going on here that you just haven't mentioned (or I missed if you *did* mention it).


~~Bonnie


>Bonnie,
>
>Thank you! But my findings and the statements in MacDonald's book are the same. The navigation is controlled by a complex binding control, I quoted the exact page from his book previously.
>
>Otherwise, I am confused how .NET automatically connects the navigation without a command? Can you please explain it? Please, I do not understand how this automatic connection occurs without an instruction - please help me here, because I do not understand this automatic connection - please. To be clear: How does the navigation get automatically connected in .NET - this I wish I could get explained. MacDonald just says it happens.
>
>Also, my case was two different tables, two different datasets, clearly .NET was choosing (and here is the issue, it was CHOOSING) the wrong control.
>
>Your example shows the same table, or copies of it, assigned to two different comboboxes, that was not what I was doing. I explained I had a customer table and a salesperson table - my example was a customer data entry window. .NET was setting the navigation control to be the salesperson combobox (there was NO customer combobobox or "complex control").
>
>Again, thank you, as I said, my limited understanding was the result of missing documentation, i.e. "The Binding property sets the binding"
>
>But please answer the automatic navigation setting, please.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform