Back to Devexpress

GridControl.Cursor Property

windowsforms-devexpress-dot-xtragrid-dot-gridcontrol-5786c4dc.md

latest2.6 KB
Original Source

GridControl.Cursor Property

Gets or sets the cursor that is displayed when the mouse pointer is over the current GridControl.

Namespace : DevExpress.XtraGrid

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
public override Cursor Cursor { get; set; }
vb
Public Overrides Property Cursor As Cursor

Property Value

TypeDescription
Cursor

A System.Windows.Forms.Cursor object that represents the cursor to display when the mouse pointer is over the control.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Cursor 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-move-cell-using-drag-drop/CS/Classes/GridViewHelper.cs#L38

csharp
BaseView view = gridView.GridControl.GetViewAt(e.Location);
(view as GridView).GridControl.Cursor = Cursors.Default;
BaseHitInfo baseHI = view.CalcHitInfo(e.Location);

winforms-grid-move-cell-using-drag-drop/VB/Classes/GridViewHelper.vb#L34

vb
Dim view As BaseView = gridView.GridControl.GetViewAt(e.Location)
TryCast(view, GridView).GridControl.Cursor = Cursors.Default
Dim baseHI As BaseHitInfo = view.CalcHitInfo(e.Location)

See Also

GridControl Class

GridControl Members

DevExpress.XtraGrid Namespace