Navigated Event - User Controls


Author
Message
Tim Dol
Tim Dol
StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
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

Tim Dol
Tim Dol
StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Trent/Ben,

I emailed you a test project recreating the issue.

Tim

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yeah, we got it and will take a look at it.  Thanks. Smile
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
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.

Attachments
StrataFrame.zip (84 views, 1.00 MB)
Ben Hayat
Ben Hayat
Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)Advanced StrataFrame User (516 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
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!

..ßen
Tim Dol
Tim Dol
StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
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

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
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.
Tim Dol
Tim Dol
StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
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

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
Sure thing, here you go, and built in Release this time, dated this morning.
Attachments
StrataFrame.zip (67 views, 1.00 MB)
Tim Dol
Tim Dol
StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Thanks Ben, the navigate event now works. Cool
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