List Views
Configuring the list view of a collection in Konstrukt, the back office UI builder for Umbraco.
A list view is a list based view of a collections entities providing such features as pagination for large collections, custom data views, searching and bulk actions.

A collection list view
The list view configuration is a sub configuration of a
Collection
config builder instance and is accessed via it's ListView
method.Accesses the list view config of the given collection.
// Example
collectionConfig.ListView(listViewConfig => {
...
});
Adds the given property to the list view.
// Example
listViewConfig.AddField(p => p.FirstName, fieldConfig => {
...
});
Sets the heading for the list view field.
// Example
fieldConfig.SetHeading("First Name");
Sets the format expression for the list view field.
// Example
fieldConfig.SetFormat((v, p) => $"{v} years old");
Field views allow you to customize the markup of the field in the list view so that you can show more rich visualizations of the fields content. See Field Views Documentation for more info.
Sets the view component for the list view field.
// Example
fieldConfig.SetView("ImageFieldView");
Sets the view component for the list view field.
// Example
fieldConfig.SetView<ImageFieldView>();
Sets the runtime visibility of the list view field.
// Example
fieldConfig.SetVisibility(ctx => ctx.UserGroups.Any(x => x.Alias == "editor"));
Sets the number of items to display per page for the given list view.
// Example
listViewConfig.SetPageSize(20);
Last modified 9mo ago