WPF中DataGraid转换DataRowView出错求指教
if (this.dg.CurrentCell != null){int i = dg.SelectedIndex;DataRowView drv = (DataRowView)dg.SelectedItem ;MessageBox.Show(drv.Row.Table.Rows[i]["DVRI_DVRID"].ToString());,转换为DataRowView时候出错。dataRowView 总为空,.row的时候就出错了。