Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

how to get the event before save, clsaActionExtender

$
0
0
i have a winform with a button cmdSave with the property
Me.CslaActionExtender1.SetActionType(Me.cmdSave, Csla.Windows.CslaFormAction.Save)


i want that when te user clicks the cmdSave button, a messagebox to appear ask him if he wants to continue, and if the answer is yes, the save process can go ahead, else the object shouldn't be saved.
i tried
Private Sub CmdSaveClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
                   Dim result = MessageBox.Show("Some question", MessageBoxButtons.YesNo)
            If result = DialogResult.Yes Then
                bcloneBeforeSaving = False
                bButtonclicked = cmdSave
            ElseIf result = DialogResult.No Then
                Exit Sub
            End If
         End Sub


the problem is that when i click no, the object is anyway saved,i also tried the method CslaActionExtender1_ObjectSaving but still no result,the object is saved anyway.
thanks a lot for your time and attention, any kind of suggestion would be very helpful

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>