DataGrid1.SelectedItem.Cells[0] 
或者 DataGrid1.Items[DataGrid1.SelectedIndex] 

解决方案 »

  1.   

    5.8 How can I select the entire row when the user clicks on a cell in the row?
    http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q689q
      

  2.   

    一般来说只能得到选定单元格的内容
    string s=dg1[dg1.CurrentRowIndex,columnIndex].ToString(); 
    如果想返回一个datarow的话,可以使用CurrentRowIndex属性到dataset
    去到
      

  3.   

    如果你想返回整行,不要使用CurrentRowIndex,因为CurrentRowIndex是对DataGrid而言的,在数据源中数据的位置与它在DataGrid中的位置不一定相同,比如点击DataGrid表头进行排序以后。
    你可以这样做(假设是数据源是DataTable):
    DataRow dr=(DataRow)this.dataGrid1.BindingContext[this.dataGrid1.DataSource,this.dataGrid1.DataMember].Current;