DataGridHtmlGroupRowDecorationEventArgs<T>.Expanded Property

Gets the expand state of the processed group row.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

public bool Expanded { get; }

Property Value

Type Description
Boolean

true if the group row is expanded; otherwise, false.

Remarks

Use the Expanded argument to find out whether the decorated group row is expanded.

<DxDataGrid Data="@Vacancies"
            ShowPager="true"
            ShowGroupPanel="true"
            HtmlRowDecoration="@OnHtmlRowDecoration">
    <DxDataGridColumn Field="@nameof(Vacancy.Id)" Width="70px" AllowGroup="false"></DxDataGridColumn>
    <DxDataGridColumn Field="@nameof(Vacancy.Description)"></DxDataGridColumn>
    <DxDataGridComboBoxColumn Field="@nameof(Vacancy.Region)" Data="@VacancyRepository.Regions" GroupIndex="0"></DxDataGridComboBoxColumn>
    <DxDataGridColumn Field="@nameof(Vacancy.City)" GroupIndex="1"></DxDataGridColumn>
</DxDataGrid>

@code {
    IEnumerable<Vacancy> Vacancies;

    void OnHtmlRowDecoration(DataGridHtmlRowDecorationEventArgs<Vacancy> eventArgs) {
        if(eventArgs is DataGridHtmlGroupRowDecorationEventArgs<Vacancy> groupEventArgs)
            if (groupEventArgs.Expanded)
                groupEventArgs.CssClass += " table-primary";
    }
}

DataGrid GroupRow Decoration

See Also