public override void ExternalAction(ReoGridControl grid, SpreadsheetEditorNode node) { base.ExternalAction(grid, node); var worksheet = string.IsNullOrWhiteSpace(WorksheetName) ? grid.CurrentWorksheet : grid.Worksheets[WorksheetName]; if (Add) { worksheet.IterateCells(Range, (r, c, cell) => { worksheet[r, c] = new ProgressCell { BottomColor = new SolidColor(100, 100, 100), TopColor = new SolidColor(80, 80, 80) }; return(true); }); } if (Remove) { worksheet.IterateCells(Range, (r, c, cell) => { worksheet[r, c] = new CellBody(); return(true); }); } }
public virtual void ExternalAction(ReoGridControl grid, SpreadsheetEditorNode node) { if (Others != null) { foreach (var behavior in Others) { behavior?.ExternalAction(grid, node); } } }
public override void ExternalAction(ReoGridControl grid, SpreadsheetEditorNode node) { base.ExternalAction(grid, node); if (!IsChanged) { return; } var worksheet = string.IsNullOrWhiteSpace(WorksheetName) ? grid.CurrentWorksheet : grid.Worksheets[WorksheetName]; int i = 0; worksheet.IterateCells(Range, (r, c, cell) => { cell.Data = string.IsNullOrWhiteSpace(FlatText[i]) ? (object)FlatValue[i] : (object)FlatText[i]; i++; return(true); }); IsChanged = false; }