C# Janus GridEX:查找是否单击了标题

C# Janus GridEX:查找是否单击了标题,c#,winforms,janus,gridex,C#,Winforms,Janus,Gridex,当前,当我双击任何网格项时,将触发下面的事件。这包括我是否双击标题 有没有办法区分单击的标题或行?SelectedItem位置始终大于0 this.grdItems = new Janus.Windows.GridEX.GridEX(); ... this.grdItems.DoubleClick += new System.EventHandler(this.grdItems_DoubleClick); private void grdItems_DoubleClick(object sen

当前,当我双击任何网格项时,将触发下面的事件。这包括我是否双击标题

有没有办法区分单击的标题或行?SelectedItem位置始终大于0

this.grdItems = new Janus.Windows.GridEX.GridEX();
...
this.grdItems.DoubleClick += new System.EventHandler(this.grdItems_DoubleClick);

private void grdItems_DoubleClick(object sender, System.EventArgs e)
    { 
        if (grdItems.SelectedItems!=null && grdItems.SelectedItems[0].Position >= 0)
        {
          //doing something
        }
    }

一种方法是使用
HitTest()
方法

声明变量

public int MLastX { get; set; }
public int MLastY { get; set; }
有一种方法可以捕获最后一次鼠标单击的坐标

/// <summary>
/// Handles the MouseDown event of the grdSearch control. On a mousedown the click co-ordinates
///  is set.  This method is used to determine whether you have clicked on a gridrow cell in the method above
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs"/> instance containing the event data.</param>
private void grdSearch_MouseDown(object sender, MouseEventArgs e)
{
    MLastX = e.X;
    MLastY = e.Y;
}

一种方法是使用
HitTest()
方法

声明变量

public int MLastX { get; set; }
public int MLastY { get; set; }
有一种方法可以捕获最后一次鼠标单击的坐标

/// <summary>
/// Handles the MouseDown event of the grdSearch control. On a mousedown the click co-ordinates
///  is set.  This method is used to determine whether you have clicked on a gridrow cell in the method above
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs"/> instance containing the event data.</param>
private void grdSearch_MouseDown(object sender, MouseEventArgs e)
{
    MLastX = e.X;
    MLastY = e.Y;
}