方法一:
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();Wpf:获取当前选中行的某列值
最新推荐文章于 2026-05-04 08:25:41 发布

4208

被折叠的 条评论
为什么被折叠?



