Dim oDT As DataTable = Me.RadGridView1.DataSource
Dim oDTchanges As DataTable = oDT.GetChanges
If Not IsNothing(oDTchanges) Then
For Each oRow As DataRow In oDTchanges.Rows
Select Case oRow.RowState
Case DataRowState.Added
Try
'get the new data
Dim strSopnumbe As String = oRow("sopnumbe")
'data access code to save new rows
Catch ex As Exception
FPCommon.ErrorHandler.globalErrorHandler(ex, True)
End Try
Case DataRowState.Deleted
Dim intRowID As Int32 = oRow("RowID", DataRowVersion.Original)
'data access code to delete the row
Case DataRowState.Modified
Try
'get the changed data
Dim intRowID As Int32 = oRow("RowID")
Dim strSopnumbe As String = oRow("sopnumbe")
'data access code to update the row
Catch ex As Exception
FPCommon.ErrorHandler.globalErrorHandler(ex, True)
End Try
End Select
Next
oDT.AcceptChanges()
End If