Base class for row and column delete commands. Captures only the cells that will be removed or whose formulas reference the deleted range, then performs the delete. Undo re-inserts the blank rows/columns and restores the captured cells in place. Snapshot/restore plumbing is inherited from RangeSnapshotCommandBase.
Object
Spreadsheet.RangeSnapshotCommandBase
Spreadsheet.RangeSnapshotCommandBase.Capture
Spreadsheet.RangeSnapshotCommandBase.CaptureRange
Spreadsheet.RangeSnapshotCommandBase.RestoreSnapshot
Spreadsheet.RangeSnapshotCommandBase.Restore
Spreadsheet.RangeSnapshotCommandBase.Execute
Spreadsheet.RangeSnapshotCommandBase.RequiredAction
Spreadsheet.RangeSnapshotCommandBase.Feature
Namespace: Radzen.Blazor.Spreadsheet
Assembly: Radzen.Blazor.dll
public abstract class DeleteRangeCommandBase : Spreadsheet.RangeSnapshotCommandBase, Spreadsheet.ICommand, Spreadsheet.IProtectedCommandInitializes a new instance of the DeleteRangeCommandBase class.
protected DeleteRangeCommandBase(Documents.Spreadsheet.Worksheet sheet, int startIndex, int endIndex)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.Worksheet | sheet | The worksheet to modify. |
| int | startIndex | The first row/column index to delete (inclusive). |
| int | endIndex | The last row/column index to delete (inclusive). |
Gets the number of indices in the deletion range.
protected int Count { get; }
| Type | Description |
|---|---|
| int | Gets the number of indices in the deletion range. |
Deletes the row/column range from the worksheet.
protected abstract void DeleteRange()Returns true when the cell at address falls inside the deletion range.
protected abstract bool IsInsideRange(Documents.Spreadsheet.CellRef address)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.CellRef | address |
| Type | Description |
|---|---|
| bool |
Returns true when the formula of cell references any row/column inside the deletion range — these cells get rewritten to #REF! by the worksheet and must be snapshotted for undo.
protected abstract bool ReferencesRange(Documents.Spreadsheet.Cell cell)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.Cell | cell |
| Type | Description |
|---|---|
| bool |
Re-inserts Count blank rows/columns at startIndex.
protected abstract void ReinsertRange()