CellEditContext.GetEditorValue(String) Method

Returns a value of any grid cell.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

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

The following example illustrates how to use the GetEditorValue method.

<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>

Online Demo

Data Grid - Cascading Editors

See Also