Devexpress DevExress XtraGrid MouseDown事件不会再次激发

Devexpress DevExress XtraGrid MouseDown事件不会再次激发,devexpress,xtragrid,mousedown,Devexpress,Xtragrid,Mousedown,我的XtraGrid上有MouseDown事件,不想在同一列上再次触发 它可以识别第一次单击,但除非在尝试单击原始行/列之前单击另一列或行,否则不会发生任何事情 谁能告诉我我错过了什么?以下是MouseDown事件中的代码: var hitInfo = gridViewSpecialty.CalcHitInfo(e.Location); if (hitInfo.InRowCell) { int nRow = hitI

我的XtraGrid上有MouseDown事件,不想在同一列上再次触发

它可以识别第一次单击,但除非在尝试单击原始行/列之前单击另一列或行,否则不会发生任何事情

谁能告诉我我错过了什么?以下是MouseDown事件中的代码:

         var hitInfo = gridViewSpecialty.CalcHitInfo(e.Location);
         if (hitInfo.InRowCell)
         {
             int nRow = hitInfo.RowHandle;
             GridColumn column = hitInfo.Column;
             LinkClick(nRow, column);

         }

谢谢!!鲍勃

很可能是由于事件出错。我敢打赌,如果在该语句周围放置
Try{}catch{}
,可能会捕获错误

下面是我在尝试用网格捕获用户单击事件时使用的方法。我使用双击事件,如下所示:

private void gcMainGrid_DoubleClick(object sender, EventArgs e)
{
    try
    {
        GridControl gc = (GridControl)sender;
        DevExpress.Utils.DXMouseEventArgs dxMEA = (DevExpress.Utils.DXMouseEventArgs)e;
        GridView gv = (GridView)gc.MainView;
        int iRowHandle = gv.CalcHitInfo(dxMEA.X, dxMEA.Y).RowHandle;

        //Check to see if the user is on a row.
    if (iRowHandle >= 0)
    {
        //Do something here.
    }
    catch(Exception ex)
    {
        if (Debugger.IsAttached)
            Debugger.Break();
        else
            throw(ex);
    }
}

这将获得用户单击的行的RowHandle。我想这就是你想要的,但我不会使用鼠标按下事件。

在gridView\u MouseDown事件中,上面的代码是什么事件。