I am trying to remove one or many rows from a dataset and be able to access the details of each deleted row.

For example:
Dim dr As DataRow
dr =myDataset.Tables("tbl_Alerts").rows(.Rows.Count - 1)
Debug.WriteLine(dr.Item(0) & "," & dr.RowState)
.Rows.Remove(dr)
'dr.Delete()
Debug.WriteLine(dr.Item(0) & "," & dr.RowState)

However I get an exception with the last line:
An unhandled exception of type 'System.Data.RowNotInTableException' occurred in system.data.dll

Although I could store an array of the ids of the rows I have deleted, I would prefer to be able to work with the dataset if possible. Does anyone know how to flag the datarow for deletion without actually deleting it?