| | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: 07/10/2008 8:05:20 AM Posts: 146, Visits: 512 |
| | I would like to trap the New,Edit,Delete button click events on the menustrip. |
| | | | 
StrataFrame Beginner
       
Group: StrataFrame Users Last Login: Yesterday @ 8:21:39 AM Posts: 46, Visits: 1,201 |
| | 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 |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 9:36:54 PM Posts: 4,200, Visits: 4,251 |
| | 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 |
| | | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: 07/10/2008 8:05:20 AM Posts: 146, Visits: 512 |
| | 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? |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 9:36:54 PM Posts: 4,200, Visits: 4,251 |
| 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" |
| |
|
|