更新时间:2023-12-05 10:27:58
我认为这 ^ ]可能会对您有所帮助.
I think this answer by Bigsby[^] might help you.
如果您将FullRow中的SelectionUnit属性.
These code works if you put the SelectionUnit property in FullRow.
private void GetSelectedRowCellValue()
{
foreach (DataGridRow row in dataGrid1.SelectedItems)
{
System.Data.DataRow MyRow = (System.Data.DataRow)row.Item;
string value = MyRow["columnname"].ToString();
}
}