Umbraco UI Builder
CMSCloudHeartcoreDXP
10.latest (LTS)
10.latest (LTS)
  • Umbraco UI Builder Documentation
  • Known Issues
  • Release Notes
  • Installation
    • Installing Umbraco UI Builder
    • Licensing
  • Upgrading
    • Upgrading Umbraco UI Builder
    • Version Specific Upgrade Notes
    • Migrate from Konstrukt to Umbraco UI Builder
  • Getting Started
    • Overview
    • Configuration
    • User Interface
  • How-to Guides
    • Creating your first integration
  • Areas
    • Overview
    • Sections
      • Summary Dashboards
    • Trees
      • Folders
    • Dashboards
    • Context Apps
  • Collections
    • Overview
    • The Basics
    • List Views
      • Field Views
    • Editors
    • Child Collections
      • Child Collection Groups
  • Searching
    • Overview
    • Searchable Properties
  • Filtering
    • Overview
    • Global Filters
    • Data Views
      • Data Views Builders
    • Filterable Properties
  • Actions
    • Overview
    • The Basics
    • Action Visibility
    • Inbuilt Actions
  • Cards
    • Overview
    • Count Cards
    • Custom Cards
  • Property Editors
    • Overview
    • Entity Picker
  • Advanced
    • Virtual Sub Trees
    • Encrypted Properties
    • Value Mappers
    • Repositories
    • Events
  • Miscellaneous
    • Conventions
    • Umbraco Aliases
Powered by GitBook
On this page
  • Defining filterable properties
  • AddFilterableProperty(Lambda filterablePropertyExpression, Lambda filterConfig = null) : CollectionConfigBuilder<TEntityType>
  • Changing the label of a filterable property
  • SetLabel(string label) : FilterablePropertyConfigBuilder<TEntityType, TValueType>
  • Adding a description to a filterable property
  • SetDescription(string description) : FilterablePropertyConfigBuilder<TEntityType, TValueType>
  • Defining basic options for a filterable property
  • SetOptions(IDictionary<TValueType, string> options) : FilterablePropertyConfigBuilder<TEntityType, TValueType>
  • Defining options with custom compare clauses for a filterable property
  • AddOption(object key, string label, Lambda compareExpression) : FilterablePropertyConfigBuilder<TEntityType, TValueType>
  • Configuring the mode of a filterable property
  • SetMode(FilterMode mode) : FilterablePropertyConfigBuilder<TEntityType, TValueType>
Edit on GitHub
Export as PDF
  1. Filtering

Filterable Properties

Configuring filterable properties in Umbraco UI Builder, the backoffice UI builder for Umbraco.

PreviousData Views BuildersNextOverview

Last updated 1 year ago

Umbraco UI Builder can dynamically build a filter dialog choosing appropriate editor views for you based on a basic property configuration. Properties of a number or date types will become range pickers and enums. Properties with options defined will become select/checkbox lists and all other properties will become text input filters.

Defining filterable properties

AddFilterableProperty(Lambda filterablePropertyExpression, Lambda filterConfig = null) : CollectionConfigBuilder<TEntityType>

Adds the given property to the filterable properties collection.

// Example
collectionConfig.AddFilterableProperty(p => p.FirstName, filterConfig => filterConfig 
    // ...
);

Changing the label of a filterable property

SetLabel(string label) : FilterablePropertyConfigBuilder<TEntityType, TValueType>

// Example
filterConfig.SetLabel("First Name");

Adding a description to a filterable property

SetDescription(string description) : FilterablePropertyConfigBuilder<TEntityType, TValueType>

// Example
filterConfig.SetDescription("The first name of the person");

Defining basic options for a filterable property

SetOptions(IDictionary<TValueType, string> options) : FilterablePropertyConfigBuilder<TEntityType, TValueType>

// Example
filterConfig.SetOptions(new Dictionary<string, string> {
    { "Option1", "Option One" },
    { "Option2", "Option Two" }
});

Defining options with custom compare clauses for a filterable property

AddOption(object key, string label, Lambda compareExpression) : FilterablePropertyConfigBuilder<TEntityType, TValueType>

// Example
filterConfig.AddOption("Option1", "Option One", (val) => val != "Option Two");

Configuring the mode of a filterable property

For filterable properties with options you can configure whether the options should be multiple or single choice.

SetMode(FilterMode mode) : FilterablePropertyConfigBuilder<TEntityType, TValueType>

// Example
filterConfig.SetMode(FilterMode.MultipleChoice);

Defining filterable properties is controlled via the configuration.

collections
Filterable Properties