Umbraco UI Builder
CMSCloudHeartcoreDXP
16.latest
16.latest
  • Umbraco UI Builder Documentation
  • Known Issues
  • Release Notes
  • Getting Started
    • Requirements
    • Installing Umbraco UI Builder
    • Licensing
    • Configuration
    • User Interface
  • Upgrading
    • Upgrading Umbraco UI Builder
    • Version Specific Upgrade Notes
    • Migrate from Konstrukt to Umbraco UI Builder
  • 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
      • Retrieve Child Collections
    • Related Collections
    • Entity Identifier Converters
  • 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 Data Views
  • Using the AddDataView() Method
  • Using the AddDataView() Method with Group
  • Using the AddAllDataView Method

Was this helpful?

Edit on GitHub
Export as PDF
  1. Filtering

Data Views

Learn how to configure data views in Umbraco UI Builder.

PreviousGlobal FiltersNextData Views Builders

Last updated 6 days ago

Was this helpful?

Data views allow you to define multiple pre-filtered views of the same data source. This is useful when entities exist in different states and you need a way to toggle between them.

Defining Data Views

Data views are defined via the Collections settings.

Using the AddDataView() Method

Creates a data view with the specified name and a where clause filter expression. The expression must return a boolean value.

Method Syntax

AddDataView(string name, Lambda whereClauseExpression) : CollectionConfigBuilder<TEntityType>

Example

collectionConfig.AddDataView("Active", p => p.IsActive);

Using the AddDataView() Method with Group

Creates a data view within a specified group, using a where clause filter expression. The expression must return a boolean value.

Method Syntax

AddDataView(string group, string name, Lambda whereClauseExpression) : CollectionConfigBuilder<TEntityType>

Example

collectionConfig.AddDataView("Status", "Active", p => p.IsActive);

Using the AddAllDataView Method

Enables the All option for data views in the collection. The method can take an empty string, which will display the CMS localized All value, plain text, or a localized string.

Method Synthax

collectionConfig.AddAllDataView(string? label)
Data Views