Skip to main content

DxGrid.FooterDisplayMode Property

Specifies when to display the footer in the Grid.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(GridFooterDisplayMode.Auto)]
[Parameter]
public GridFooterDisplayMode FooterDisplayMode { get; set; }

Property Value

Type Default Description
GridFooterDisplayMode Auto

A GridFooterDisplayMode enumeration value.

Available values:

Name Description
Auto

The footer is visible if it displays total summary values or your custom footer template. Otherwise, the footer is hidden.

Never

The footer is always hidden even if it contains total summary values or if you specify a custom footer template.

Always

The footer is always visible regardless of its content.

Remarks

The default FooterDisplayMode property value is Auto. In this mode, the Grid shows the footer only if it displays total summary values or you custom footer template. You can set the FooterDisplayMode property to Always or Never to display or hide the footer regardless of total summary values.

The following example changes footer display mode to Always.

Blazor Grid Footers Display Mode Always

@using Microsoft.EntityFrameworkCore
@inject IDbContextFactory<NorthwindContext> NorthwindContextFactory
@implements IDisposable

<DxGrid Data="@Data"
        FooterDisplayMode="GridFooterDisplayMode.Always">
    <Columns>
        <DxGridDataColumn FieldName="Country" />
        <DxGridDataColumn FieldName="City" />
        <DxGridDataColumn FieldName="OrderDate" />
        <DxGridDataColumn FieldName="UnitPrice" DisplayFormat="c"/>
        <DxGridDataColumn FieldName="Quantity" />
    </Columns>
</DxGrid>

@code {
    object Data { get; set; }
    NorthwindContext Northwind { get; set; }

    protected override void OnInitialized() {
        Northwind = NorthwindContextFactory.CreateDbContext();
        Data = Northwind.Invoices
            .ToList();
    }

    public void Dispose() {
        Northwind?.Dispose();
    }
}

To customize the appearance of the footer and/or its cells, handle the CustomizeElement event.

Implements

See Also