Example of Label Filtering in Blazor Pivot Table Component

Pivot Table / Filtering / Label Filtering

This sample demonstrates filtering row and column headers based on their text. The different conditions that can be applied to the text are equals, begins with, ends with, contains, etc.

Properties
Fields:
Condition:
Value 1:

In this sample, any field can be selected from the Fields dropdown list. Further, choose an option from the Conditions dropdown list, enter the values in Value1 and Value2 input textbox and apply the same to view the field headers filtered based on the text.

Label filtering can be applied either through code-behind or UI. To achieve this in code-behind, set the AllowLabelFilter property in PivotViewDataSourceSettings to true and use the PivotViewFilterSetting in the pivot table along with the following properties.

Name : Specifies the normal field.
Type : Specifies the filter type and it should be "Label" in this scenario.
Condition : Specifies the operator type like equals, greater than, less than, etc.
Value1 : Gets the text to view the filter result. For example, select "DoesNotEquals" and enter "Germany" to exclude this country.
Value2 : For conditions like "between" and "not between", this option will be enabled. Enter both start and end text to view the filter result. For example, enter "Germany" and "States" to filter the countries within this range.

To achieve label filtering through UI, navigate to "User Interaction > Field List" sample and open the filter dialog to experience the same. For API details, refer to the "Field List" sample description.

More information on the label filtering feature can be found in this documentation section.

Transform your Blazor web apps today with Syncfusion® Blazor components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE