1、想得到鼠标所在CELL的文本(注意!不是DATAGRID的行号和列号~),该怎么做呢?
2、DATAGRID中的数据在用户点击了上面的排序后,DATASET中的数据和DATAGRID中的数据对应不上了,有什么好办法解决吗?谢谢~~~

解决方案 »

  1.   

    楼上说的是取DATAGRID的行号和列号,并没取到该CELL中的文字啊?
      

  2.   

    2、好像DataSet中的DataTable.DefaultView顺序和DataGrid显示顺序一致
      

  3.   

    sorry,在我回复的同时,2楼的兄弟也回复了~~~
      

  4.   

    或者用下面的方法可以获取与排序后DataGrid选中行对应的DataSet中的数据
    BindingManagerBase bm = this.dataGrid1.BindingContext[this.dataGrid1.DataSource, this.dataGrid1.DataMember]; DataRow dr = ((DataRowView)bm.Current).Row; 
      

  5.   

    看看你的Cell中是否有Label或别的控件
      

  6.   

    用grd1.Items[i].Attributes.Add("onmouseover","方法(this);");
    再取值