CellEditContext.OnChanged(Object) Method

A delegate method that handles changes in a custom editor.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll


public virtual void OnChanged(
    object value


Name Type Description
value Object

Cell values.


When you use an edit template, the grid does not know what you have changed in editors inside this template. Call the OnChanged method when you change a cell value in a custom editor to inform the grid about the change and save a new cell value to the EditedValues collection. Then, this collection is passed to the RowUpdating and RowInserting events.

<DxDataGrid Data="@DataSource"
    RowUpdating="@((updatingDataItem, newValues) => OnRowUpdating(updatingDataItem, newValues))"
    RowInserting="@((newValues) => OnRowInserting(newValues))">
    <DxDataGridColumn Field="@nameof(Product.ProductCategoryId)" Caption="Category">
            <DxDataGrid Data="@NestedDataSource"
                SelectedDataRowChanged="@(newCellValue => cellEditContext.OnChanged(newCellValue.ProductSubcategoryID))">

Online Demo

Data Grid - Templates

See Also