Skip to main content

CellEditContext.GetEditorValue(String) Method

Returns a value of any grid cell.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public object GetEditorValue(
    string fieldName
)

Parameters

Name Type Description
fieldName String

A data source field name.

Returns

Type Description
Object

A cell value.

Remarks

<DxDataGrid Data="@Vacancies" >
    ...
    <DxDataGridComboBoxColumn Field="@nameof(Vacancy.Region)"
        Data="@VacancyRepository.Regions">
        <EditTemplate>
            @{
                var editingContext = (CellEditContext)context;
                var region = (string)editingContext.GetEditorValue(nameof(Vacancy.Region));
            }
            ...
        </EditTemplate>
    </DxDataGridComboBoxColumn>
    <DxDataGridColumn Field="@nameof(Vacancy.City)">
        <EditTemplate>
            @{
                var editingContext = (CellEditContext)context;
                var region = (string)editingContext.GetEditorValue(nameof(Vacancy.Region));
                var city = ((string)(editingContext.GetEditorValue(nameof(Vacancy.City))));
            }
            ...
        </EditTemplate>
    </DxDataGridColumn>
</DxDataGrid>

Run Demo: Data Grid - Edit Forms

See Also