GridViewInfo info = gridview1.GetViewInfo() as GridViewInfo;
GridCellInfo cellInfo = info.GetGridCellInfo(gridview1.FocusedRowHandle, gridview1.FocusedColumn);
Point _cellPoint = new Point(cellInfo.Bounds.X, cellInfo.Bounds.Y);
Point _screenPoint = gridControl1.PointToScreen(_cellPoint);
DEV gridview 获取单元格相对于的屏幕坐标
最新推荐文章于 2023-04-22 15:57:09 发布
本文介绍了一种方法,通过GridViewInfo和GridCellInfo获取当前聚焦单元格的屏幕坐标。首先利用GetViewInfo方法获得GridView的视图信息,然后通过GetGridCellInfo获取指定行和列的单元格信息,接着创建一个表示单元格位置的Point对象,最后将该位置转换为屏幕坐标。

868

被折叠的 条评论
为什么被折叠?



