public void UpdateCell(int index, string columnName, Type type, object newValue) { if (ChangedRows == null) { ChangedRows = new ChangedRows(); } ChangedRows.AddNewCell(index, columnName, type, _TempValue, newValue); }
public void ReturnAllCellsToValue(DataGridView dataGridView) { if (ChangedRows == null) { return; } foreach (int index in ChangedRows.Rows.Keys) { foreach (string columnName in ChangedRows.Rows[index].Cells.Keys) { CurTable.Rows[index][columnName] = ChangedRows.Rows[index] .Cells[columnName].OldValue; PaintDefaultColor(dataGridView, index, columnName); } } ChangedRows = null; }