回复 3楼yaoxiaoqiang00的帖子
如下代码,供您参考:
- void gcSpreadSheet1_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
- {
- Point pt = e.GetPosition(gcSpreadSheet1);
- HitTestInformation hitTest = gcSpreadSheet1.HitTest(pt.X, pt.Y);
- int rowIndex = hitTest.ViewportInfo.Row;
- int colIndex = hitTest.ViewportInfo.Column;
- }
复制代码 |