Back to Devexpress

TreeListColumnCollection.ForEach(Action<TreeListColumn>) Method

windowsforms-devexpress-dot-xtratreelist-dot-columns-dot-treelistcolumncollection-dot-foreach-x28-system-dot-action-devexpress-dot-xtratreelist-dot-columns-dot-treelistcolumn-x29.md

latest2.1 KB
Original Source

TreeListColumnCollection.ForEach(Action<TreeListColumn>) Method

Executes the specified action on each element of the collection.

Namespace : DevExpress.XtraTreeList.Columns

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
public void ForEach(
    Action<TreeListColumn> action
)
vb
Public Sub ForEach(
    action As Action(Of TreeListColumn)
)

Parameters

NameTypeDescription
actionAction<TreeListColumn>

The delegate to execute on each element of the collection.

|

Example

The code below converts all column headers to uppercase.

csharp
treeList1.Columns.ForEach(column => column.Caption = column.Caption.ToUpper());
vb
treeList1.Columns.ForEach(Sub(column) column.Caption = column.Caption.ToUpper())

See Also

ForEach(Action<TreeListBand>)

TreeListColumnCollection Class

TreeListColumnCollection Members

DevExpress.XtraTreeList.Columns Namespace