Businss Binding Source not working (sorta)


Author
Message
Charles Thomas Blankenship...
Charles Thomas Blankenship
StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)StrataFrame User (448 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
I have three grids on the form ... the primary business object is LeadBO which has two child business objects (DialLogBO and DialRecallsBO).  Currently I have a BBS wrapping up the DevExpress XtraGrid and the parent child relationships setup properly. 

With only the BBS for the Primary Business Object hooking up the XtraGrid the record pointer in the grid navigates in sync with the form's navigation buttons ... good.

However, when I wrap the two child grids (a simple Grid View Control from WinForms) ... the child records display in the two grids properly and the navigation buttons are properly navigating the BO and syncing up the two child grids properly ... good.

The problem is this:  as soon as I place the two Business Binding Sources on the form the navigation on the XtraGrid stops syncing with the BO pointer.  The children are still displaying child records and the BO is actually navigating ... but the record pointer on the XtraGrid no longer moves.  Not only that ... when the user selects the row in the grid manually ... the BO's record pointer no longer moves along with it.  It is as if the BBS completely disengages with the XtraGrid for the LeadBO.

Anyone with a clue about what might be going on?

Separate issue:

So, I went to the samples to try and figure out if I could use something simpler like a StrataFrame ListView.  Each and everytime I try to open a solution in VS2012 I get the blasted error in the design time of the form that states VS can no longer find a reference to SF's Standard Form.  There is a reference to Microfour.StrataFrame.UI in the References section of the project ... I can't figure this one out either.

Thanks

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
I'm guessing that you ran into the exact same thing that Kieth did a couple days ago.  When you place a grid in a child container, sometimes the child container's BindingContext gets accessed before the BindingContext of the form is created, so it creates a different instance of the CurrencyManager, which manages the record pointer.

Try this: right after the call to Me.InitializeComponent() in the constructor, set the BindingContext of the grids to the BindingContext of the form.  That will tell them all to use the same CurrencyManager.

Like this:

Public Sub New()
    '-- InitializeComponent call
    Me.InitializeComponent()

    '-- Set the BindingContexts
    Me.grid1.BindingContext = Me.BindingContext
    Me.grid2.BindingContext = Me.BindingContext
End Sub
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search