Back to Devexpress

GridView.LeftCoordChanged Event

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridview-ab15bce6.md

latest3.3 KB
Original Source

GridView.LeftCoordChanged Event

Fires when the View is scrolled horizontally.

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
[DXCategory("Property Changed")]
public event EventHandler LeftCoordChanged
vb
<DXCategory("Property Changed")>
Public Event LeftCoordChanged As EventHandler

Event Data

The LeftCoordChanged event's data class is EventArgs.

Remarks

LeftCoordChanged can be handled to provide a response to scrolling the View horizontally. End-users can scroll the View using the horizontal scrollbar or the keyboard. The scrollbar’s availability is controlled by the GridView.HorzScrollVisibility property.

Use the GridView.LeftCoord property to obtain the current horizontal scrolling offset.

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

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-scrolling-by-columns/CS/WindowsApplication3/GridHScrollHelper.cs#L17

csharp
public void EnableScrollByColumns() {
    this.view.LeftCoordChanged += OnLeftCoordChanged;
}

winforms-grid-scrolling-by-columns/VB/WindowsApplication3/GridHScrollHelper.vb#L17

vb
Public Sub EnableScrollByColumns()
    AddHandler view.LeftCoordChanged, AddressOf OnLeftCoordChanged
End Sub

See Also

LeftCoord

MakeColumnVisible(GridColumn)

HorzScrollVisibility

GridView Class

GridView Members

DevExpress.XtraGrid.Views.Grid Namespace