How to get the original value of a DataColumn from a DataRow?

I have a DataTable, and I want to find out the value of the source column for all changed rows of data.

I use the following approach to get the value of an Orginal column before changing the DataRow.

DataRow[] dataRowArray = dataTableInstance.Select(null,null,DataViewRowState.OriginalRows);
DataRow originalDataRow = dataRowArray[rowIndex][columnIndex, DataRowVersion.Original] 

Please indicate what I am doing wrong here? The above code does not give me the source column, instead it gives me the last modified value of the column.

Thank.
Nihil

+3
source share
2 answers

AcceptChanges ( , Update DataAdapter TableAdapter ). , , , .

+2
DataRow row = undefinedrow;   
row["Column"].ToString(); 

, Ston of Column devined.

0

Source: https://habr.com/ru/post/1743785/


All Articles