CheckValue (this [col], col, false);
}
- void CheckValue (object v, DataColumn col)
+ private void CheckValue (object v, DataColumn col)
{
CheckValue (v, col, true);
}
//Copy all values of this DataRow to the row parameter.
internal void CopyValuesToRow (DataRow row)
+ {
+ CopyValuesToRow(row, true);
+ }
+
+ internal void CopyValuesToRow (DataRow row, bool doROCheck)
{
if (row == null)
throw new ArgumentNullException("row");
if (targetColumn != null) {
if (HasVersion (DataRowVersion.Original)) {
object val = column[Original];
- row.CheckValue (val, targetColumn);
+ row.CheckValue (val, targetColumn, doROCheck);
targetColumn [row.Original] = val;
}
if (HasVersion (DataRowVersion.Current) && Current != Original) {
object val = column[Current];
- row.CheckValue (val, targetColumn);
+ row.CheckValue (val, targetColumn, doROCheck);
targetColumn [row.Current] = val;
}
if (HasVersion (DataRowVersion.Proposed)) {
object val = column[row.Proposed];
- row.CheckValue (val, targetColumn);
+ row.CheckValue (val, targetColumn, doROCheck);
targetColumn [row.Proposed] = val;
}
}
// add the current row\r
DataRow newRow = copyTable.NewNotInitializedRow ();\r
copyTable.Rows.AddInternal (newRow);\r
- row.CopyValuesToRow (newRow);\r
+ // Don't check for ReadOnly, when cloning data to new uninitialized row.\r
+ row.CopyValuesToRow (newRow, false);\r
newRow.XmlRowID = row.XmlRowID;\r
addedRows.Add (row, row);\r
}\r
if (targetRow == null)
{
DataRow newRow = targetTable.NewNotInitializedRow();
- row.CopyValuesToRow(newRow);
+ // Don't check for ReadOnly, when cloning data to new uninitialized row.
+ row.CopyValuesToRow(newRow, false);
targetTable.Rows.AddInternal (newRow);
}
// row exists in target table, and presere changes is false -