Good morning guys, I'm currently stuck on a particular problem here.
Currently on edit mode I have a procedure for the "Update" button to execute a procedure (done via the wizard)
Now I'm trying to add a stored procedure on the "Cancel" button. I need to validate some data
Can I add the command here ?
Kindly please help? I know this is easy for experts out there
If e.Item.IsInEditMode Then
If TypeOf e.Item Is GridDataInsertItem Then
Dim editItem As GridEditableItem = DirectCast(e.Item, GridEditableItem)
Dim InsertButton As ImageButton = DirectCast(editItem.FindControl("PerformInsertButton"), ImageButton)
Dim CancelButton As ImageButton = DirectCast(editItem.FindControl("CancelButton"), ImageButton)
CancelButton.Visible =
True
Else
Dim editItem As GridEditableItem = DirectCast(e.Item, GridEditableItem)
Dim updateButton As ImageButton = DirectCast(editItem.FindControl("UpdateButton"), ImageButton)
Dim CancelUpdateButton As ImageButton = DirectCast(editItem.FindControl("CancelButton"), ImageButton)
CancelUpdateButton.Visible =
True
End If
End If
Thanks in advance :)