Home - Forums-.NET - FlyGrid.Net (Windows Forms) - double click ont the grid

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 ont the grid
Link Posted: 12-Sep-2005 00:18
I want to implemet the Double_click event but i want to ignore it if the double clicl was click on the header.
how can i know if the double click was click on one of the rows or on the headers
tanks,
Link Posted: 12-Sep-2005 05:51
You can use FlyGrid.GetHitTestInfoAt method to determine where mouse cursor is located.
[C#]
private void flyGrid_MouseDown(object sender, MouseEventArgs e)
{
  FlyGrid grid = sender as FlyGrid;
  HitTestInfo ht = grid.GetHitTestInfoAt(e.X, e.Y);
  if ((ht.HitTest & HitTest.OnNode) != 0)
  {
    NodeBase node = ht.port.Rows.GetNodeFromRow(ht.Row);
   System.Diagnostics.Debug.WriteLine(string.Format("Down: Button:{0}, Clicks:{1}, Node:{2}, Level:{3}, Row:{4}, HitTest:{5}", e.Button, e.Clicks, node.Value, node.Depth, ht.Row, ht.HitTest));
  }
}