Back to Devexpress

FocusedColumnChangedEventArgs.FocusedColumn Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-focusedcolumnchangedeventargs.md

latest3.0 KB
Original Source

FocusedColumnChangedEventArgs.FocusedColumn Property

Gets the currently focused column.

Namespace : DevExpress.XtraGrid.Views.Base

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
public GridColumn FocusedColumn { get; }
vb
Public ReadOnly Property FocusedColumn As GridColumn

Property Value

TypeDescription
GridColumn

A GridColumn object representing the currently focused column. null ( Nothing in Visual Basic) if no column s currently focused.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FocusedColumn 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.

winforms-grid-hot-track-focused-column-header/CS/WindowsApplication1/Form1.cs#L38

csharp
{
    ((GridView)sender).InvalidateColumnHeader(e.FocusedColumn);
    ((GridView)sender).InvalidateColumnHeader(e.PrevFocusedColumn);

winforms-grid-hot-track-focused-column-header/VB/WindowsApplication1/Form1.vb#L39

vb
Private Sub gridView1_FocusedColumnChanged(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.Base.FocusedColumnChangedEventArgs)
    CType(sender, GridView).InvalidateColumnHeader(e.FocusedColumn)
    CType(sender, GridView).InvalidateColumnHeader(e.PrevFocusedColumn)

See Also

PrevFocusedColumn

FocusedColumnChangedEventArgs Class

FocusedColumnChangedEventArgs Members

DevExpress.XtraGrid.Views.Base Namespace