You can enable the filtering option for your columns. To enable this functionality use the Filterable method of the Column object:
Columns.Add(o => o.Customers.CompanyName)
.Titled("Company Name")
.Filterable(true)
.Width(220);
After that you can filter this column.
You can enable filtering for all columns of a grid using the Filterable method for the GridODataClient object:
var client = new GridODataClient<Order>(httpClient, url, query, false, "ordersGrid", columns, 10, locale)
.Filterable();
You can enable a button to clear all selected filters using the ClearFiltersButton method of the GridODataClient object:
var client = new GridODataClient<Order>(httpClient, url, query, false, "ordersGrid", columns, 10)
.ClearFiltersButton(true);
GridBlazor supports several types of columns (specified in the Add method):
It also supports nullable types of any element of the list.
GridBlazor has different filter widgets for these types:
TextFitlerWidget: it provides a filter interface for text columns (System.String). This means that if your column has text data, GridBlazor will render an specific filter interface:
NumberFilterWidget: it provides a filter interface for number columns (System.Int32, System.Decimal etc.)
BooleanFilterWidget: it provides a filter interface for boolean columns (System.Boolean):
DateTimeFilterWidget: it provides a filter interface for datetime columns (System.DateTime):
Pressing the + and - buttons you can add multiple options to filter. You can also select the condition you want to use, either And or Or:
You can also create your own filter widgets.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。