当前位置:首页 > windos > 正文

WPF 获取DataGrid 控件选中的单元格信息

获取 DataGrid 选中的单元格的信息
DataGridCellInfo cell_Info = this.studentTable.SelectedCells[0];

studentTableItem student_Info = cell_Info.Item as studentTableItem;

 

studentTableItem  为一个自定义类 单元格中的数据绑定的是这个自定义类