StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Track Click on SF MaintenanceFormToolStripExpand / Collapse
Author
Message
Posted 05/15/2008 3:31:21 AM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 2 days ago @ 9:27:31 PM
Posts: 146, Visits: 513
I would like to trap the New,Edit,Delete button click events on the menustrip.
Post #16385
Posted 05/15/2008 3:46:11 AM


StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: Today @ 5:56:31 AM
Posts: 46, Visits: 1,212
Hi Michael,

don't know, if this is possible the easy way, but you can catch the appropriate events much more precisely on the BO's, which gives you more control, e.g. BeforeSave, AfterSave and so on.

HTH, Ralph

Post #16386
Posted 05/15/2008 9:24:21 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 2:43:51 PM
Posts: 4,241, Visits: 4,285
Ralph is going dow the right path here...the toolstrip is somewhat "dumb."  It is just calling an Add on the BO, so you can handle the BeforeAddNew, AfterAddNew, BeforeDelete, etc.

When you handle the Before events, you can prevent the action from happening.  For example:

Private Sub MyBo_BeforeAddNew(ByVal e As MicroFour.StrataFrame.Business.BeforeAddNewEventArgs) Handles Me.BeforeAddNew
    e.Cancel = True
End Sub
Post #16389
Posted 05/16/2008 1:35:57 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 2 days ago @ 9:27:31 PM
Posts: 146, Visits: 513
Thanks,

The problem I am having is that I am calling a form childform in Edit mode and canceling it. When I return to te parent form, the maintenacetoolstrip Save button is enabled only. The edititing state is returning from the childform is still in add mode?  

Post #16420
Posted 05/19/2008 8:40:23 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 2:43:51 PM
Posts: 4,241, Visits: 4,285
The edititing state is returning from the childform is still in add mode?  

If you do not undo the changes then that would be true.  When you return you need to either undo or save the changes if you want the state of the BO to change back to "Idle"

Post #16439
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:08pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.094. 8 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.