StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
WinForms (How do I?)
»
BBS issue
BBS issue
Post Reply
Like
0
BBS issue
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Keith Chisarik
Keith Chisarik
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame Users
Posts: 939,
Visits: 40K
That worked, thanks.
Keith Chisarik
Sigma Data Systems
Reply
Like
0
StrataFrame Team
S
StrataFrame Team
posted 11 Years Ago
ANSWER
Post Details
Share Post
S
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
Ok, Keith, I finally got this one figured out. Something, I have no idea what, is accessing the BindingContext of the ThemedContainer in the setup and loading of the form before the form's BindingContext is created, so the ThemedContainer just creates its own BindingContext. Any other control on the form that doesn't have its own BindingContext uses its parent's, which cascades up to the form's BindingContext. The BindingContext is the object that creates the CurrencyManager, which controls the currently selected item. So, by having the DataGridView in a ThemedContainer, it is using a different CurrencyManager because it has a different BindingContext.
Luckily for us, BindingContext is not read-only
So, adding the following line of code right after the InitializeComponent() call in the constructor fixes it.
public Form1()
{
InitializeComponent();
this.themedContainer1.BindingContext = this.BindingContext; //<-- This line sets the BindingContext of the ThemedContainer back to the BindingContext of the form
}
That should get you fixed.
Reply
Like
0
Keith Chisarik
Keith Chisarik
posted 11 Years Ago
ANSWER
Topic Details
Share Topic
Group: StrataFrame Users
Posts: 939,
Visits: 40K
Scenario:
DataGridView with BBS as its datasource, BBS BO set to a BO on my form. All works fine when DataGridView is on the form. If I move the datagridview into a container (ThemedContainer) and it no longer syncs.
Why and how to fix please?
Keith Chisarik
Sigma Data Systems
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search