| | | StrataFrame Beginner
       
Group: StrataFrame Users Last Login: 05/12/2008 2:35:16 PM Posts: 12, Visits: 48 |
| Hello
I noticed that the business objects have the events BeforeSave, BeforeAddNew, BeforeDelete and BeforeUndo.
I need to use an event "BeforeEdit" but i'm not meeting.
Is there any way to do that?
Thanks. |
| | | | StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 9:46:15 PM Posts: 288, Visits: 1,135 |
| Angela Sampaio (04/30/2008) I need to use an event "BeforeEdit" but i'm not meeting.
Is there any way to do that?
Thanks. Hi Angela, I don't see any Before Edit, but you may be able to do something like this: Private Sub CustomersBO1_EditingStateChanged(ByVal e As MicroFour.StrataFrame.Business.EditingStateChangedEventArgs) Handles CustomersBO1.EditingStateChanged If e.EditingState = MicroFour.StrataFrame.Business.BusinessEditingState.Editing Then '-- Check your conditions here and undo the editing if needed. Me.CustomersBO1.Undo(MicroFour.StrataFrame.Business.BusinessUndoType.CurrentRowOnly) End If End Sub I am not sure it will work for you, but it may give you an idea. 
Edhy RijoProgytech (Computer Consultants) |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 3:24:00 PM Posts: 3,733, Visits: 3,926 |
| Edhy is right. You will either want to use the EditingStateChanged event or the IsDirtyChanged event. Those would be your two options. It would be difficult to have a BeforeEdit event as this is really down at the column level and could add a lot of overhead if it were in fact checked each time a row column state changed. So you will want to do this in one of the two aforementioned events. |
| | | | StrataFrame Beginner
       
Group: StrataFrame Users Last Login: 05/12/2008 2:35:16 PM Posts: 12, Visits: 48 |
| Thanks!
I think that this will help me. |
| |
|
|