我使用此代码,但它返回System.Data.DataRowView而不是多选行的列值
foreach (var item in myListView.SelectedItems)
{
//do something with the values, maybe add to a list?
}
答案 0 :(得分:3)
foreach (var item in myListView.SelectedItems)
{
DataRowView dr = (DataRowView)item ;
var sValue = dr.Row["columnName"] as string;
}