To whom this may concern, I have searched a considerable amount of time, to work a way out of this error
\"Deleted row information cannot be accessed
The current value for the data column in the inner if statement will not be available for deleted rows. To retrieve a value for deleted rows, specify that you want the original value. This should fix your error:
if (Convert.ToString(ds.Tables[0].Rows[i][0, DataRowVersion.Original].ToString()) == value)