Umbraco UI Builder
CMSCloudHeartcoreDXP
15.latest
15.latest
  • Umbraco UI Builder Documentation
  • Known Issues
  • Release Notes
  • Getting Started
    • First Steps with UI Builder
    • Requirements
    • Installing Umbraco UI Builder
    • Licensing
    • Configuration
    • User Interface
  • Upgrading
    • Upgrade your UI Builder setup
    • Upgrading Umbraco UI Builder
    • Version Specific Upgrade Notes
    • Migrate from Konstrukt to Umbraco UI Builder
  • How-to Guides
    • Creating your First Integration
  • Areas
    • Explore Areas in UI Builder
    • Sections
      • Summary Dashboards
    • Trees
      • Folders
    • Dashboards
    • Context Apps
  • Collections
    • Work with Collections in UI Builder
    • The Basics
    • List Views
      • Field Views
    • Editors
    • Child Collections
      • Child Collection Groups
      • Retrieve Child Collections
    • Related Collections
    • Entity Identifier Converters
  • Searching
    • Add Search to Your Collections
    • Searchable Properties
  • Filtering
    • Filter Your Data with Ease
    • Global Filters
    • Data Views
      • Data Views Builders
    • Filterable Properties
  • Actions
    • Trigger Actions in UI Builder
    • The Basics
    • Action Visibility
    • Inbuilt Actions
  • Cards
    • Display Insights with Cards
    • Count Cards
    • Custom Cards
  • Property Editors
    • Enhance Input with Property Editors
    • Entity Picker
  • Advanced
    • Ready to go deeper?
    • Virtual Sub Trees
    • Encrypted Properties
    • Value Mappers
    • Repositories
    • Events
  • Miscellaneous
    • Conventions
    • Umbraco Aliases
Powered by GitBook
On this page
  • Configuring a List View
  • Using the ListView() Method
  • Adding a Field to the List View
  • Using the AddField() Method
  • Changing the Heading of a Field
  • Using the SetHeading() Method
  • Formatting the Value of a Field
  • Using the SetFormat() Method
  • Setting the View of a Field
  • Using the SetView() Method
  • Using the SetView<TView>() Method
  • Setting the Visibility of a Field
  • Using the SetVisibility() Method
  • Changing the Page Size
  • Using the SetPageSize Method

Was this helpful?

Edit on GitHub
Export as PDF
  1. Collections

List Views

Configuring the list view of a collection in Umbraco UI Builder.

PreviousThe BasicsNextField Views

Last updated 1 month ago

Was this helpful?

A list view displays a collection entity in a list format and includes features like pagination, custom data views, searching, and bulk actions.

Configuring a List View

The list view configuration is a sub-configuration of a Collection config builder instance and can be accessed via the ListView method.

Using the ListView() Method

Accesses the list view configuration for the specified collection.

Method Syntax

ListView(Lambda listViewConfig = null) : ListViewConfigBuilder<TEntityType>

Example

collectionConfig.ListView(listViewConfig => {
    ...
});

Adding a Field to the List View

Using the AddField() Method

Adds a specified property to the list view.

Method Syntax

AddField(Lambda propertyExpression, Lambda fieldConfig = null) : ListViewFieldConfigBuilder<TEntityType, TValueType>

Example

listViewConfig.AddField(p => p.FirstName, fieldConfig => {
    ...
});

Changing the Heading of a Field

Using the SetHeading() Method

Sets the heading for a field in the list view.

Method Syntax

SetHeading(string heading) : ListViewFieldConfigBuilder<TEntityType, TValueType>

Example

fieldConfig.SetHeading("First Name");

Formatting the Value of a Field

Using the SetFormat() Method

Sets the format expression to the field in the list view.

Method Syntax

SetFormat(Lambda formatExpression) : ListViewFieldConfigBuilder<TEntityType, TValueType>

Example

fieldConfig.SetFormat((v, p) => $"{v} years old");

Setting the View of a Field

You can customize the field's markup with field views, allowing richer visualizations of the content. For more details, see the Field Views article.

Using the SetView() Method

Sets the view component for the list view field.

Method Syntax

SetView(string viewComponentName) : ListViewFieldConfigBuilder<TEntityType, TValueType>

Example

fieldConfig.SetView("ImageFieldView");

Using the SetView<TView>() Method

Sets the view component for the list view field.

Method Syntax

SetView<TView>() : ListViewFieldConfigBuilder<TEntityType, TValueType>

Example

fieldConfig.SetView<ImageFieldView>();

Setting the Visibility of a Field

Using the SetVisibility() Method

Controls the runtime visibility of a field in the list view.

Method Syntax

SetVisibility(Predicate<ListViewFieldVisibilityContext> visibilityExpression) : ListViewFieldConfigBuilder<TEntityType, TValueType>

Example

fieldConfig.SetVisibility(ctx => ctx.UserGroups.Any(x => x.Alias == "editor"));

Changing the Page Size

Using the SetPageSize Method

Sets the number of items per page for the list view.

Method Syntax

SetPageSize(int pageSize) : ListViewConfigBuilder<TEntityType>

Example

listViewConfig.SetPageSize(20);
A collection list view