StrataFrame Forum

Navigated Event - User Controls

http://forum.strataframe.net/Topic9576.aspx

By Tim Dol - 6/14/2007

I have a user control which includes a business object, business binding source and a Grid Control.  The BO Navigated event only seems to fire the first time the business object is populated. Once populated it does not seem to fire as I navigate throught the grid. 

When I replicate this on a standard form it works fine.

Thanks,
Tim

By Tim Dol - 6/14/2007

Trent/Ben,

I emailed you a test project recreating the issue.

Tim

By Trent L. Taylor - 6/14/2007

Yeah, we got it and will take a look at it.  Thanks. Smile
By StrataFrame Team - 6/15/2007

OK, I figured it out... since the BBS was dropped on a UserControl and not a form, the ParentForm property of the BBS is not being properly set; the aquiring of the CurrencyManager for the BBS is done within the Setter of the ParentForm property if ParentForm IsNot Nothing.  So, I changed the ParentForm property from a Form to an IContainerControl and it is now able to properly evaluate the BindingContext when the BBS is dropped on a user control.  Here are the base DLLs.  I would recommend backing up the DLLs that you currently have in your Common Files folder in case you run into an issue accesing the BOMapper because I cannot give you the AddIns and Extensibility DLLs that go along with these because they are torn up at the moment with some changes that are being implemented.

On the places where you have dropped a BBS on a user control, you'll need to go to the .designer.vb file for the user control and change the lines

Me.BBS.ParentForm = Nothing

to

Me.BBS.ParentForm = Me

for each BusinessBindingSource that you have dropped on a user control.

By Ben Hayat - 6/15/2007

Hi Ben;



Will this solution be applicable to the problem that I brought it up to you a few says ago (where the ToolStip navigation did not work with BBS), unless the toolstrip was placed on a Std form with BBS?



Thanks!



p.s. Although, I ended up creating my own Base Maintenance form, with several other controls on them, but I thought someone else might run into the same issue as I did!
By Tim Dol - 6/18/2007

Hi Ben, I uninstalled the 4 dll's from the GAC, copied the new ones to folder c:\Program Files\Common Files\MicroFour\StrataFrame. I then dragged them to the GAC.

I went into my project and changed the bbs.ParentForm = Me, but I get a message  'Value of type myUserControl cannot be converted to System.Windows.Forms

Did I perform the correct steps?

Thanks,

Tim

By StrataFrame Team - 6/19/2007

Yes, you performed the correct steps.  It might be that you didn't re-open Visual Studio... or I sent you the incorrect DLLs.  The ParentForm property should now be a MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl, not a System.Windows.Forms.Form.
By Tim Dol - 6/20/2007

Ben,

I repeated the steps once again and this time restarted VS and I still have the same problem. Can you please resend me the dll's.

Thanks

Tim

By StrataFrame Team - 6/21/2007

Sure thing, here you go, and built in Release this time, dated this morning.
By Tim Dol - 6/22/2007

Thanks Ben, the navigate event now works. Cool