CellEditContext.DataItem Property

Returns the current data item.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

public object DataItem { get; }

Property Value

Type Description
Object

A data item.

Remarks

The following example illustrates how to use the DataItem property that returns a grid row.

<DxDataGrid Data="@DataSource">
    ...
    <DxDataGridColumn Field="@nameof(Product.ProductCategoryId)" >
        <EditTemplate>
            @{ 
                var cellEditContext = (CellEditContext)context;
                int currentCellValue = (int)cellEditContext.CellValue;
                var currentDataItem = cellEditContext.DataItem;
            }
            ...
        </EditTemplate>
    </DxDataGridColumn>
</DxDataGrid>

Online Demo

Data Grid - Templates

See Also