Back to Devexpress

BaseView.MouseUp Event

windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-baseview-98a5e117.md

latest8.7 KB
Original Source

BaseView.MouseUp Event

Occurs when the mouse button is released if it was pressed within a View.

Namespace : DevExpress.XtraGrid.Views.Base

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
[DXCategory("Mouse")]
public event MouseEventHandler MouseUp
vb
<DXCategory("Mouse")>
Public Event MouseUp As MouseEventHandler

Event Data

The MouseUp event's data class is MouseEventArgs. The following properties provide information specific to this event:

PropertyDescription
ButtonGets which mouse button was pressed.
ClicksGets the number of times the mouse button was pressed and released.
DeltaGets a signed count of the number of detents the mouse wheel has rotated, multiplied by the WHEEL_DELTA constant. A detent is one notch of the mouse wheel.
LocationGets the location of the mouse during the generating mouse event.
XGets the x-coordinate of the mouse during the generating mouse event.
YGets the y-coordinate of the mouse during the generating mouse event.

Remarks

If pressing the mouse button resulted in activating an inplace editor, the MouseUp event is not raised. If the mouse button was pressed within a detail View, the sender of the event identifies the clone of this View where the event has actually been raised.

Note that the BaseView.Click event also fires after the mouse button has been released. The difference is that the BaseView.Click event is only raised if the mouse pointer is within the View when releasing the mouse button.

The following code snippets (auto-collected from DevExpress Examples) contain references to the MouseUp 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-multi-cell-editing/CS/MultiSelectionEditingHelper.cs#L23

csharp
this.view.OptionsBehavior.EditorShowMode = EditorShowMode.MouseDownFocused;
this.view.MouseUp += view_MouseUp;
this.view.CellValueChanged += view_CellValueChanged;

winforms-grid-add-check-box-to-column-header/CS/GridViewColumnHeaderExtender.cs#L256

csharp
view.MouseDown -= OnMouseDown;
view.MouseUp -= OnMouseUp;
view.MouseMove -= OnMouseMove;

winforms-grid-custom-button-in-column-header/CS/WindowsApplication3/ColumnHeaderExtender.cs#L47

csharp
view.MouseDown += OnMouseDown;
view.MouseUp += OnMouseUp;
view.MouseMove += OnMouseMove;

winforms-grid-move-cell-using-drag-drop/CS/Classes/GridViewHelper.cs#L29

csharp
this.gridView.MouseMove += new MouseEventHandler(gridView_MouseMove);
this.gridView.MouseUp += new MouseEventHandler(gridView_MouseUp);
this.gridView.CustomDrawCell += new RowCellCustomDrawEventHandler(gridView_CustomDrawCell);

winforms-grid-copy-cell-value-to-other-cells-by-dragging-its-right-bottom-edge/CS/Classes/DragCellsValuesHelper.cs#L43

csharp
View.MouseDown += new MouseEventHandler(View_MouseDown);
View.MouseUp += new MouseEventHandler(View_MouseUp);
View.ShowingEditor += new CancelEventHandler(View_ShowingEditor);

winforms-grid-multi-cell-editing/VB/MultiSelectionEditingHelper.vb#L22

vb
Me.view.OptionsBehavior.EditorShowMode = EditorShowMode.MouseDownFocused
AddHandler Me.view.MouseUp, AddressOf view_MouseUp
AddHandler Me.view.CellValueChanged, AddressOf view_CellValueChanged

winforms-grid-add-check-box-to-column-header/VB/GridViewColumnHeaderExtender.vb#L236

vb
RemoveHandler _view.MouseDown, AddressOf OnMouseDown
RemoveHandler _view.MouseUp, AddressOf OnMouseUp
RemoveHandler _view.MouseMove, AddressOf OnMouseMove

winforms-grid-custom-button-in-column-header/VB/WindowsApplication3/ColumnHeaderExtender.vb#L47

vb
AddHandler view.MouseDown, AddressOf OnMouseDown
AddHandler view.MouseUp, AddressOf OnMouseUp
AddHandler view.MouseMove, AddressOf OnMouseMove

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

vb
AddHandler gridView.MouseMove, AddressOf gridView_MouseMove
AddHandler gridView.MouseUp, AddressOf gridView_MouseUp
AddHandler gridView.CustomDrawCell, AddressOf gridView_CustomDrawCell

winforms-grid-copy-cell-value-to-other-cells-by-dragging-its-right-bottom-edge/VB/Classes/DragCellsValuesHelper.vb#L43

vb
AddHandler View.MouseDown, AddressOf View_MouseDown
AddHandler View.MouseUp, AddressOf View_MouseUp
AddHandler View.ShowingEditor, AddressOf View_ShowingEditor

See Also

MouseDown

MouseMove

MouseWheel

Click

BandedGridView.CalcHitInfo*

CardView.CalcHitInfo*

GridView.CalcHitInfo*

BaseView Class

BaseView Members

DevExpress.XtraGrid.Views.Base Namespace