Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GridSortInfoCollection.ClearAndAddRange(Int32, GridSortInfo[]) Method

Clears the collection, then adds the specified objects to it and sets how many columns are used to group data.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.2.dll

NuGet Package: DevExpress.Wpf.Grid.Core

#Declaration

public virtual void ClearAndAddRange(
    int groupCount,
    params GridSortInfo[] items
)

#Parameters

Name Type Description
groupCount Int32

An integer value that specifies how many columns are used to group data.

items GridSortInfo[]

An array of GridSortInfo objects to add to the collection.

#Remarks

The ClearAndAddRange method clears the current collection, adds the specified objects to it, and initializes the GridSortInfoCollection.GroupCount property with the groupCount parameter’s value.

The GridSortInfoCollection.GroupCount property specifies the number of columns from the beginning of the current collection used to group data. All the subsequent columns will only be used to sort data. If groupCount is set to 0, all the columns referred to by the collection’s elements will be used to sort data, none of them will be used for grouping.

See Also