alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class CellChange<T>

    Represents the change applied to one cell as part of an Undo/Redo action.

    Inheritance
    object
    CellChange<T>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Grids
    Assembly: Syncfusion.Blazor.Grids.dll
    Syntax
    public class CellChange<T>
    Type Parameters
    Name Description
    T

    The type of data in the row that contains the changed cell.

    Remarks

    The UndoRedoManager creates one instance for a CellEdit action and one instance for each affected cell in a Paste or AutoFill action. Row add and row delete actions do not create CellChange<T> instances; they store the affected row in RowData and its position in RowIndex.

    Constructors

    CellChange()

    Declaration
    public CellChange()

    Properties

    Column

    Gets or sets the GridColumn definition for the changed cell.

    Declaration
    public GridColumn? Column { get; set; }
    Property Value
    Type Description
    GridColumn

    The GridColumn associated with the cell. The default value is null.

    Remarks

    This property is available for cell edit, paste, and autofill changes. Row add and row delete actions do not have a cell column. The undo/redo event arguments expose only ColumnIndex, which is -1 for row add, row delete, paste, and autofill actions.

    The captured GridColumn reference is a snapshot taken at recording time and is not guaranteed to remain valid. The column may be reordered, hidden, or removed from Columns before the action is undone or redone; do not dereference this property without a null check. The stable identifier for the column is FieldName (matched against Field); prefer ColumnIndex or FieldName over this reference when resolving the target column at undo or redo time.

    ColumnIndex

    Gets or sets the zero-based index of the column that contains the changed cell.

    Declaration
    public int ColumnIndex { get; set; }
    Property Value
    Type Description
    int

    The zero-based column index within the visible leaf columns. The default value is -1.

    Remarks

    For a CellEdit, this is the column index of the edited cell. For a Paste or AutoFill action, each CellChange<T> stores the index of one affected cell. This property is not used by row add or row delete actions because those actions do not create a CellChange<T> instance.

    FieldName

    Gets or sets the field name of the column that identifies the cell in the data model.

    Declaration
    public string? FieldName { get; set; }
    Property Value
    Type Description
    string

    A string matching the Field property. The default value is null.

    Remarks

    This property is populated for cell edit, paste, and autofill changes. It must be non-empty for a change to be buffered during a paste or autofill operation.

    NewValue

    Gets or sets the value of the cell after the change was applied.

    Declaration
    public object? NewValue { get; set; }
    Property Value
    Type Description
    object

    The new cell value. The default value is null.

    Remarks

    This property is populated for cell edit, paste, and autofill changes and is reapplied when the corresponding action is redone. It is not used by row add or row delete actions because those actions store the complete row in RowData.

    OldValue

    Gets or sets the value of the cell before the change was applied.

    Declaration
    public object? OldValue { get; set; }
    Property Value
    Type Description
    object

    The previous cell value. The default value is null.

    Remarks

    This property is populated for cell edit, paste, and autofill changes and is restored when the corresponding action is undone. It is not used by row add or row delete actions because those actions store the complete row in RowData.

    RowIndex

    Gets or sets the zero-based index of the row that contains the changed cell.

    Declaration
    public int RowIndex { get; set; }
    Property Value
    Type Description
    int

    The zero-based row index. The default value is -1.

    Remarks

    This property is used only for cell edit, paste, and autofill changes. Row add and row delete actions store their row index on RowIndex instead.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved