StrataFrame Forum

Track Click on SF MaintenanceFormToolStrip

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

By Michael Reese - 5/14/2008

I would like to trap the New,Edit,Delete button click events on the menustrip.
By Ralph Rutschmann - 5/14/2008

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

By Trent L. Taylor - 5/15/2008

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
By Michael Reese - 5/16/2008

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?  

By Trent L. Taylor - 5/19/2008

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"