Skip to main content
A newer version of this page is available. .

CellEditContext.DataItem Property

Returns the current data item.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll

NuGet Package: DevExpress.Blazor

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