K
Kalim Julia
I need to delegate function using addhandler.
AddHandler mlcmdDELETERECORD.Click, AddressOf DeleteGridRecordEvent
Public Overridable Function DeleteGridRecordEvent(ByVal sender As Object,
ByVal e As System.EventArgs) As Boolean
mlDELETERECORDALLOWED = MsgBox("Are you sure want to delete the record ?",
MsgBoxStyle.YesNo + MsgBoxStyle.DefaultButton2) = MsgBoxResult.Yes
End Function
The error says :
Z:\Shared\CustomControl\CustomDataGrid\CustomDataGrid.vb(272): Method
'Public Overridable Function DeleteGridRecordEvent(sender As Object, e As
System.EventArgs) As Boolean' does not have the same signature as delegate
'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'.
Anybody can help ?
AddHandler mlcmdDELETERECORD.Click, AddressOf DeleteGridRecordEvent
Public Overridable Function DeleteGridRecordEvent(ByVal sender As Object,
ByVal e As System.EventArgs) As Boolean
mlDELETERECORDALLOWED = MsgBox("Are you sure want to delete the record ?",
MsgBoxStyle.YesNo + MsgBoxStyle.DefaultButton2) = MsgBoxResult.Yes
End Function
The error says :
Z:\Shared\CustomControl\CustomDataGrid\CustomDataGrid.vb(272): Method
'Public Overridable Function DeleteGridRecordEvent(sender As Object, e As
System.EventArgs) As Boolean' does not have the same signature as delegate
'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'.
Anybody can help ?