Private Sub RadGridView1_UserDeletingRow(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewRowCancelEventArgs) Handles RadGridView1.UserDeletingRow
Dim strItemNumber As String = ""
Dim strCustomerNumber As String = ""
Dim intAnswer As MsgBoxResult
Try
'confirm the delete
intAnswer = MsgBox("Confirm Delete?", MsgBoxStyle.OkCancel, "Delete?")
If intAnswer = vbOK Then
'there might be more than one row being deleted
For Each oRow As GridViewDataRowInfo In e.Rows
'get data from the row
strItemNumber = oRow.Cells.Item("itemnmbr").Value
strCustomerNumber = oRow.Cells.Item("custnmbr").Value
'data access code to delete the grid line
dynData.SPs.FP_IV00101Cost_DEL(strItemNumber, strCustomerNumber, appUser.Db).execute()
Next
Else
e.Cancel = True
End If
Catch ex As Exception
'cancel the delete
e.Cancel = True
'call the global error handling routine
GlobalErrorHandler(ex)
End Try
End Sub