protected override int CompareToSameType(RowEditBase rowEdit) { // We want to sort by row ID *IN REVERSE* to make sure we delete from the bottom first. // If we delete from the top first, it will change IDs, making all subsequent deletes // off by one or more! return(RowId.CompareTo(rowEdit.RowId) * -1); }
/// <summary> /// Compares two row edits by their row ID ascending. /// </summary> /// <param name="rowEdit">The other row edit to compare against</param> private int CompareByRowId(RowEditBase rowEdit) { return(RowId.CompareTo(rowEdit.RowId)); }