Skip to main content

DxGridDataColumn.FilterRowValue Property

Specifies the initial value in the column’s filter row editor.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(null)]
[Parameter]
public object FilterRowValue { get; set; }

Property Value

Type Default Description
Object null

The initial editor value.

Remarks

Enable the ShowFilterRow option to activate a row that allows users to filter Grid data. The Grid component generates and configures cell editors for filter row cells based on associated column data types. Use the FilterRowValue property to specify the initial editor value. You should also specify the FilterRowOperatorType property to define an operator type used to create a filter condition based on the editor value.

You can handle the FilterRowValueChanged event to respond to row value changes.

Blazor Grid Filter Row

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

<DxGrid Data="@Data"
        ShowFilterRow="true">
    <Columns>
        <DxGridDataColumn FieldName="OrderId"  Caption="Order ID" DisplayFormat="d"/>
        <DxGridDataColumn FieldName="OrderDate" DisplayFormat="d" />
        <DxGridDataColumn FieldName="ProductName"
                          FilterRowValue='"Queso"'
                          FilterRowOperatorType="GridFilterRowOperatorType.Contains" />
        <DxGridDataColumn FieldName="UnitPrice" DisplayFormat="c2" />
        <DxGridDataColumn FieldName="Shipped" UnboundType="GridUnboundColumnType.Boolean"
                          UnboundExpression="[ShippedDate] <> Null" />
    </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();
    }
}

Run Demo: Data Grid - Filter Row

For more information about filter row, see the following topic: Filter Row in Blazor Grid.

Implements

See Also