KB Article A2814
Visible to All Users

Why is the MouseUp event for the GridView not triggered?

Description:
How do I handle the MouseUp event within a GridView, when I click a cell? It works fine when I click the Column Header for example.

Answer:
Please note, if the View's OptionsBehavior.Editable property is true, the MouseUp is processed by the in-place editor (which opens when you click for the first time). If you need to catch the moment when the end-user moves the mouse up within the editor, you should handle the view's ShownEditor and write an event handler for the MouseUp event of the editor:

C#
private void gridView1_ShownEditor(object sender, System.EventArgs e) { gridView1.ActiveEditor.MouseUp += new MouseEventHandler(ActiveEditor_MouseUp); } private void ActiveEditor_MouseUp(object sender, MouseEventArgs e) { //DO something }
Visual Basic
Private Sub GridView1_ShownEditor(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GridView1.ShownEditor AddHandler GridView1.ActiveEditor.MouseUp, AddressOf ActiveEditor_MouseUp End Sub Private Sub ActiveEditor_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) 'DO SOMETHING End Sub

See Also:
Why is the DoubleClick event for the GridView not triggered?
How to make the grid activate its in-place editor on double click only

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.