StrataFrame Forum

maintenancetoolstrip

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

By Eric Leissler - 7/13/2011

Hi,

I just want on a form, make not possible to add an record

what i have to do

in my code  a message appair with  mbox, but after, a new record is created.

How to not autorise a new record, after the message ?

Thanks

BEST REGARDS

eric LEISSLER

Private Sub Base_maintenancetoolstrip1_ItemClicked(sender As System.Object, e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles Base_maintenancetoolstrip1.ItemClicked

If e.ClickedItem.Name = "cmdNew" Then
baseric.el_manip_de_formulaire.mbox("Création d'assiociation imposible")


End If

 

End Sub

 



By Ivan George Borges - 7/13/2011

Hi Eric.

Have you tried handling your BO.BeforeAddNew method and setting e.Cancel = True when necessary?
By Eric Leissler - 7/13/2011

hi ivan

i resovle the problem with de properties

IncludewButton = false

but i shoud like to coding

e.cancel = true in the properties

Base_maintenancetoolstrip1_ItemClicked

many thanks

Best regard

Eric LEISSLER

By Ivan George Borges - 7/14/2011

Glad you got it working, Eric!

http://forum.strataframe.net/Skins/Classic/Images/EmotIcons/Wink.gif