Back to Devexpress

GroupLevelStyleEventArgs.Level Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-grouplevelstyleeventargs-bb85df36.md

latest2.4 KB
Original Source

GroupLevelStyleEventArgs.Level Property

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

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
public int Level { get; }
vb
Public ReadOnly Property Level As Integer

Property Value

TypeDescription
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.

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

GroupedColumns

GroupLevelStyleEventArgs Class

GroupLevelStyleEventArgs Members

DevExpress.XtraGrid.Views.Grid Namespace