wpf datagrid根据多选选中的获取单元格内容,进行操作数据
private void Button_Click(object sender, RoutedEventArgs e)
{
var vLst = this.dgList.SelectedItems;
for (int i = 0; i < vLst.Count; i++)
{
1.//获取选中的数据
string str = (dgList.Columns[1].GetCellContent(vLst[i]) as TextBlock).Text;
2. //开始处理操作数据
}
}