G
Guest
I'm working in Visual Studio 2005 and C#.
I have a DataTable with many rows. The user can delete a row. After the row
is deleted, I'd like to column values for the deleted row, but any attempt to
access column values results in the following exception:
{"Deleted row information cannot be accessed through the row."}
My understanding is that a copy of the original row is still in there. Any
suggestions on how to access??
Thanks,
Randy
DataViewRowState dvrs = DataViewRowState.Deleted;
DataRow[] rows = MyDataSet.MyDataTable.Select("", "", dvrs);
for (int i = 0; i < rows.Length; i++)
{
DataRow dr = rows;
Console.WriteLine(dr["Column42"].ToString());
}
I have a DataTable with many rows. The user can delete a row. After the row
is deleted, I'd like to column values for the deleted row, but any attempt to
access column values results in the following exception:
{"Deleted row information cannot be accessed through the row."}
My understanding is that a copy of the original row is still in there. Any
suggestions on how to access??
Thanks,
Randy
DataViewRowState dvrs = DataViewRowState.Deleted;
DataRow[] rows = MyDataSet.MyDataTable.Select("", "", dvrs);
for (int i = 0; i < rows.Length; i++)
{
DataRow dr = rows;
Console.WriteLine(dr["Column42"].ToString());
}