以下是引用goodgoodstudy在2005-8-1 23:29:00的发言:
第一个问题我可以解决的.
在MouseDown事件中,编写如下代码:
DataGrid dataGrid1=(DataGrid)sender;
System.Windows.Forms.DataGrid.HitTestInfo hti;
hti=dataGrid1.HitTest(e.X,e.Y);
j=hti.Row;
其中j是在类中声明的变量,在这里既可获得选中行数.
第二个问题我不知你说的是什么意思.
![](images/smilies/emot/em03.gif)
![](images/smilies/emot/em03.gif)
HitTestInfo,这个在DataGrid点的后面怎么没有呢?
是不是我写错了地方?
不是写在dataGrid1的Click事件里吗?
![](/skin/img/sigline.gif)
<iframe name="alimamaifrm" frameborder="0" marginheight="0" marginwidth="0" border="0" scrolling="no" width="300" height="170" src="/go/app/tbk_app/chongzhi_300_170.php?pid=mm_28854300_2441872_11377541&page=chongzhi_300_170.php&size_w=300&size_h=170&stru_phone=1&stru_game=1&stru_travel=1" ></iframe>