Skip to main content

CellEditContext.OnChanged(Object) Method

A delegate method that handles changes in a custom editor.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public virtual void OnChanged(
    object value
)

Parameters

Name Type Description
value Object

Cell values.

Remarks

When you use an edit template, the editors inside this template do not inform the grid about changes made to their values. If you have complex dependencies between editors, call the OnChanged method to inform the editors about changes and save the new cell values to the EditedValues collection. Then, the grid passes this collection 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">
        <EditTemplate>
            <DxDataGrid Data="@NestedDataSource"
                SelectedDataRowChanged="@(newCellValue => cellEditContext.OnChanged(newCellValue.ProductSubcategoryID))">
                ...
            </DxDataGrid>
        </EditTemplate>
    </DxDataGridColumn>
</DxDataGrid>

Run Demo: Data Grid - Templates

See Also