Back to Devexpress

ColumnHeaderClickEventArgs.Column Property

wpf-devexpress-dot-xpf-dot-grid-dot-columnheaderclickeventargs.md

latest2.5 KB
Original Source

ColumnHeaderClickEventArgs.Column Property

Gets a column whose header is clicked.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public ColumnBase Column { get; }
vb
Public ReadOnly Property Column As ColumnBase

Property Value

TypeDescription
ColumnBase

A column whose header is clicked.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Column property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-click-column-header-to-select-all-its-cells/CS/B183292SelectingColumnsByClickOnHeader/MainWindow.xaml.cs#L19

csharp
for (int i = 0; i < view.Grid.VisibleRowCount; i++)
    view.SelectCell(i, e.Column as GridColumn);
view.Grid.EndSelection();

wpf-data-grid-click-column-header-to-select-all-its-cells/VB/B183292SelectingColumnsByClickOnHeader/MainWindow.xaml.vb#L25

vb
For i As Integer = 0 To Me.view.Grid.VisibleRowCount - 1
    Me.view.SelectCell(i, TryCast(e.Column, GridColumn))
Next

See Also

ColumnHeaderClickEventArgs Class

ColumnHeaderClickEventArgs Members

DevExpress.Xpf.Grid Namespace