IDataGridViewEditingControl.EditingPanelCursor Property


Gets the cursor used when the mouse pointer is over the DataGridView.EditingPanel but not over the editing control.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

Cursor EditingPanelCursor { get; }

Property Value

Type: System.Windows.Forms.Cursor

A Cursor that represents the mouse pointer used for the editing panel.

The editing panel is the Panel that hosts the editing control when the DataGridView control is in edit mode. The actual editing control may not cover the entire area of the editing panel. In this case, the EditingPanelCursor implementation should return the cursor to use when the mouse pointer is over the panel but not over the control. Typically, you will want to return the same cursor that the control uses. If you want to change the cursor that appears when the pointer is over the control, you must set the Cursor property. You can set this in the constructor of the IDataGridViewEditingControl implementation, or you can set it in the PrepareEditingControlForEdit implementation.

The following code example provides an implementation of this member. This example is part of a larger example available in How to: Host Controls in Windows Forms DataGridView Cells.

// Implements the IDataGridViewEditingControl
// .EditingPanelCursor property.
public Cursor EditingPanelCursor
        return base.Cursor;

.NET Framework
Available since 2.0
Return to top