Skip to main content
All docs
V24.2

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

GridBandCollection.ForEach(Action<GridBand>) Method

Executes the specified action on each element in the collection.

Namespace: DevExpress.XtraGrid.Views.BandedGrid

Assembly: DevExpress.XtraGrid.v24.2.dll

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

#Declaration

public void ForEach(
    Action<GridBand> action
)

#Parameters

Name Type Description
action Action<GridBand>

The delegate to execute on each element in the collection.

#Remarks

The code below converts the captions of all bands to uppercase.

bandedGridView1.Bands.ForEach(band => band.Caption = band.Caption.ToUpper());
See Also