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

GroupLevelStyleEventArgs.Level Property

Gets the nesting level of group rows whose style is to be specified.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v24.2.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

#Declaration

public int Level { get; }

#Property Value

Type Description
Int32

A zero-based integer value representing the row nesting level.

#Remarks

When grouping by multiple columns is applied, group rows are arranged into a tree. Each group row’s nesting level matches the corresponding grouping column’s GridColumn.GroupIndex property value. So, the number of nesting levels is equal to the number of grouping columns.

The image below illustrates group row levels.

GroupLevelStyle - Level

Read the Level property value to determine the nesting level of group rows whose style is to be customized. To modify style settings, use the GroupLevelStyleEventArgs.LevelAppearance property.

As stated above, you can use the Level property to obtain the grouping column at the current nesting level. The Level property’s value is the column’s position within the ColumnView.GroupedColumns collection.

See Also