方法一: DataRowView mySelectedElement = (DataRowView)dataGrid1.SelectedItem; string result = mySelectedElement.Row[0]ToString(); 方法二: var a = this.dataGrid1.SelectedItem; var b = a as DataRowView; string result = b.Row[0].ToString();
时间: 2024-10-10 09:02:43