int index = dataGrid1.SelectedIndex; //当前行号wpf里面获取当前选中某行的下标如果要获取选中多行的下标怎么获取?
foreach (var item in dataGrid1.SelectedItems){...}