// .................................................................... // // Row editing // // .................................................................... // Creates a new Row element and copies all properties from a given row. // No cell is created in a new row private static TableRow CopyRow(TableRow currentRow) { Invariant.Assert(currentRow != null, "null check: currentRow"); TableRow newRow = new TableRow(); // Copy all properties LocalValueEnumerator properties = currentRow.GetLocalValueEnumerator(); while (properties.MoveNext()) { LocalValueEntry propertyEntry = properties.Current; // Copy a property if it is not ReadOnly if (!propertyEntry.Property.ReadOnly) { newRow.SetValue(propertyEntry.Property, propertyEntry.Value); } } return newRow; }