Private Sub Datagrid1_CancelCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles Datagrid1.CancelCommand
'Cancel command
Datagrid1.EditItemIndex = -1
End Sub
Private Sub Datagrid1_UpdateCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles Datagrid1.UpdateCommand
'Update command
Dim ProductID As Integer = Datagrid1.DataKeys(e.Item.ItemIndex)
End Sub
Private Sub Datagrid1_DeleteCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles Datagrid1.DeleteCommand
'Delete command
Dim ProductID As Integer = Datagrid1.DataKeys(e.Item.ItemIndex)
End Sub