Back to Devexpress

DXCollectionView.GroupDescription Property

maui-devexpress-dot-maui-dot-collectionview-dot-dxcollectionview-524ae76f.md

latest2.3 KB
Original Source

DXCollectionView.GroupDescription Property

Gets or sets how to group data items in the view. This is a bindable property.

Namespace : DevExpress.Maui.CollectionView

Assembly : DevExpress.Maui.CollectionView.dll

NuGet Package : DevExpress.Maui.CollectionView

Declaration

csharp
public GroupDescription GroupDescription { get; set; }

Property Value

TypeDescription
GroupDescription

An object that specifies how to group items in the list.

|

Remarks

The DXCollectionView allows you to combine items into groups. To expand or collapse a group, a user should tap the group header.

To group Collection View items, initialize the GroupDescription property with a GroupDescription object. Specify its options:

FieldNameSpecifies the name of the field whose values are used to group collection view items.GroupIntervalSpecifies how to group items, for example, alphabetically or by a date range.SortOrder (Optional)Specifies whether items are sorted in ascending or descending order.DisplayFormat (Optional)Specifies the format for group captions.

The following markup displays a list of contacts alphabetically:

xaml
<dxcv:DXCollectionView x:Name="collectionView" ItemsSource="{Binding Data}">
    <dxcv:DXCollectionView.GroupDescription>
        <dxcv:GroupDescription FieldName="Name" GroupInterval="Alphabetical"/>
    </dxcv:DXCollectionView.GroupDescription>
    <!--...-->
</dxcv:DXCollectionView>

See Also

DXCollectionView Class

DXCollectionView Members

DevExpress.Maui.CollectionView Namespace