alexa
Syncfusion
menu Syncfusion

Blazor

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

    Show / Hide Table of Contents

    Class CellUpdate

    Represents a cell value update operation for a grid row.

    Inheritance
    object
    CellUpdate
    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 CellUpdate
    Remarks

    This class contains the information required to identify a specific cell and assign a new value to it. A cell is uniquely identified by the combination of the row's primary key value and the column field name. Instances of this class are used with SetCellValueAsync(IReadOnlyList<CellUpdate>) to update one or more cell values programmatically.

    Examples
    var update = new CellUpdate
    {
        PrimaryKeyValue = 1001,
        ColumnField = "CustomerName",
        NewValue = "John Doe"
    };

    Constructors

    CellUpdate()

    Declaration
    public CellUpdate()

    Properties

    ColumnField

    Gets or sets the field name of the column that contains the target cell.

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

    A string representing the field name of the target column. The default value is Empty.

    Remarks

    The value must match the field name of a column defined in the grid. Together with PrimaryKeyValue, it uniquely identifies the cell to update.

    NewValue

    Gets or sets the new value to assign to the target cell.

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

    An object containing the value to be applied to the cell. The default value is null.

    Remarks

    The value is assigned directly to the underlying data object and must match the target property's type. This property supports nullable values. Assign null to clear the cell value when the underlying data source allows null assignments.

    PrimaryKeyValue

    Gets or sets the primary key value of the row that contains the target cell.

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

    An object representing the unique identifier of the target row. No default value is specified.

    Remarks

    This value must correspond to the primary key field of a record in the grid data source. Together with ColumnField, it is used to identify the cell to update.

    Use this property for grids that contain a single primary key column. For grids with composite primary keys, use PrimaryKeyValues instead. If both PrimaryKeyValue and PrimaryKeyValues are specified, PrimaryKeyValues takes precedence.

    PrimaryKeyValues

    Gets or sets the primary key values of the row that contains the target cell.

    Declaration
    public IReadOnlyDictionary<string, object>? PrimaryKeyValues { get; set; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, object>

    An IReadOnlyDictionary<TKey, TValue> that maps primary key column field names to their corresponding values, or null when not specified. No default value is specified.

    Remarks

    Use this property to identify rows in grids that use single or composite primary keys.

    For grids with a single primary key column, the dictionary can contain a single entry. For grids with composite primary keys, all primary key field names and their corresponding values must be provided to uniquely identify the row.

    The dictionary keys must match the field names of the grid's primary key columns defined using IsPrimaryKey. Field-name matching is case-sensitive, and the order of entries in the dictionary is not significant.

    Together with ColumnField, this property identifies the cell to update.

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