DEV的gridView双击列头判断是哪一列头的问题
西凉董卓 2018-05-17 05:29:23 private void gridView1_DoubleClick(object sender, EventArgs e)
{
Point pt = HR_grid.PointToClient(Control.MousePosition);
GridHitInfo info = gridView1.CalcHitInfo(pt);
if (!info.InRowCell && info.Column.AbsoluteIndex == 2)//Index判断用于哪一列的列头
{
CheckedAll(sender, e);
}
}
我这代码原先是好好的没问题的,但是用着用着现在突然就不行了,每次双击的列头获取到的都是不对的,比如我双击了第三个列头,结果获取到别的列头的Index,而且都是随机获取的,我在点进去又变成别的Index了