Skip to main content

LgListViewSort<TItem>

Module : Lagoon.UI
Namespace : Lagoon.UI.Components
Category: ListView
Inherits from: ComponentBase

Declares a sortable field in the "SortOptions" section of a LgListView{TItem} component.

Parameters​

ParameterTypeDescription
IsDefaultboolGets or sets a value indicating whether this field is the initial sort of the list. The list is not sorted initially when no declaration is the default one.
KeystringGets or sets the key identifying the sort (persisted state, "Key" of the sort changed event). The member path of the SortSelector is used by default (e.g. "Owner.Name"); required when the selector is not a member path.
SortSelectorExpression<Func<TItem, object>>Gets or sets the per-item sort key expression item => item.Key. A value-type key is automatically unboxed so the expression stays translatable to a remote query; a computed key (not a simple member path) works locally only and requires the Key parameter.
TextstringGets or sets the label displayed in the sort dropdown. The "Name" of the DisplayAttribute of the sorted member is used by default, then the sort key.