'ds being a DataSet
Dim SelRow As Integer
For SelRow = ds.Tables(0).Rows.Count() - 1 To 0 Step -1
'For SelRow = DataGrid1.VisibleRowCount - 1 To 0 Step -1 'Same as previous line
If DataGrid1.IsSelected(SelRow) = True Then
'Do something here with each selected row
End If
Next