dev GridControl 根据鼠标坐标 选中行

if (e.Button == System.Windows.Forms.MouseButtons.Right)
{
DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo ghi = this.gridView1.CalcHitInfo(new Point(e.X, e.Y));
gridView1.SelectRow(ghi.RowHandle);
}

 

你可能感兴趣的:(grid)