DataGridHtmlGroupRowDecorationEventArgs<T> Class

Provides data about a group row for the HtmlRowDecoration event.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.dll

Declaration

public class DataGridHtmlGroupRowDecorationEventArgs<T> :
    DataGridHtmlRowDecorationEventArgs<T>

Type Parameters

Name Description
T

The grid's data item type that equals the type of items stored in a bound data source (IEnumerable<T> or IQueryable<T>).

Remarks

The HtmlRowDecoration event allows you to change row decoration settings. The type of the HtmlRowDecoration event arguments depends on the RowType value:

The code below uses the HtmlRowDecoration event to decorate expanded group rows.

<DxDataGrid Data="@Vacancies"
            ShowFilterRow="false"
            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";
    }
}

Blazor-DataGrid-GroupRow-Decoration

Inheritance

Object
DataGridHtmlRowDecorationEventArgs<T>
DataGridHtmlGroupRowDecorationEventArgs<T>
See Also