Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Double-Click bug

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Double-Click bug
Link Posted: 08-Dec-2005 09:35
Good afternoon - I'm new to these forums so I hope I'm posting this in the correct location.  If not - please forward this to it's appropriate place.

Double-Clicking on the Scrollbar causes a the control's Double-Click event to fire instead of just rapidly paging down the list.

-LK
Link Posted: 09-Dec-2005 09:49
Instead of trapping grid.DoubleClick, trap grid.MouseDoubleClick instead.

Private Sub grdSiteList_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles grdSiteList.MouseDoubleClick

Dim grid As FlyGrid = CType(sender, FlyGrid)
Dim myPoint As Point = New Point(e.X, e.Y)
Dim ht As HitTestInfo = grid.GetHitTestInfoAt(myPoint)
Dim node As NodeBase = ht.port.Rows.GetNodeFromRow(ht.Row)

   If Not IsNothing(node) Then
      ' Put your Double-click code here...
   End If
End Sub
Link Posted: 11-Dec-2005 16:21
You're forget to analyze HitTest of received HitTestInfo, see the correct code below:

Private Sub grdSiteList_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles grdSiteList.MouseDoubleClick
  Dim grid As FlyGrid = CType(sender, FlyGrid)
  Dim myPoint As Point = New Point(e.X, e.Y)
  Dim ht As HitTestInfo = grid.GetHitTestInfoAt(myPoint)
  If (ht.HitTest And HitTest.OnNode)  0 Then  '<---determine where is the mouse cursor
   Dim node As NodeBase = ht.port.Rows.GetNodeFromRow(ht.Row)
   If Not IsNothing(node) Then
     ' Put your Double-click code here...
    End If
  End If
End Sub
Link Posted: 01-Jun-2006 12:43
If you are trying to do something in response to a double-click on a node, trap the NodeDblClick event.