1 Star 0 Fork 0

XFly-Studio / Grid.Blazor

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Using_list_filter.md 816 Bytes
Copy Edit Web IDE Raw Blame History

GridBlazor for ASP.NET Core MVC

Using a list filter

Index

There can be columns where their values can only be selected from a short list. You can use an special filter based on a list for those columns. It looks like:

In order to use a list filter you have to create a list of SelectItem objects in the OnParametersSetAsync method of the razor page:

    ...
    var shippers = shipperService.GetAllShippers();
    ...

Then you have to add the column using the SetListFilter method of the GridColumn object:

    c.Add(o => o.ShipVia)
        .RenderValueAs(o => o.Shipper.CompanyName)
        .SetListFilter(shippers);

<- Filtering | Using a date time filter ->

Comment ( 0 )

Sign in for post a comment

1
https://gitee.com/fan0217/Grid.Blazor.git
git@gitee.com:fan0217/Grid.Blazor.git
fan0217
Grid.Blazor
Grid.Blazor
master

Search