private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
int i = da1.CurrentColumn.DisplayIndex;
string str = ((TextBlock)this.da1.Columns[i].GetCellContent(this.da1.SelectedItem)).Text.Trim();
MessageBox.Show("message:选中内容"+str);
}//System.Windows.Controls.DataGrid可用实例da1代替
使用Isread可设置为编辑或不可编辑