Dim rows = From cell As DataGridViewCell In DataGridView1.SelectedCells Let rowView = DirectCast(cell.OwningRow.DataBoundItem, DataRowView) Where rowView IsNot Nothing Select rowView Distinct For Each rowView As DataRowView In rows Dim row As DataRow = rowView.Row ': ': Next
Dim rows = From cell As DataGridViewCell In DataGridView1.SelectedCells Let rowView = DirectCast(cell.OwningRow.DataBoundItem, DataRowView) Where rowView IsNot Nothing Select rowView.Row Distinct For Each row As DataRow In rows ': ': Next
Dim rowView = TryCast(gridRow.DataBoundItem, DataRowView)
Dim row As DataRow = rowView.Row
Dim o0 As Object = row("注文番号") Dim o1 As Object = row("注文番号", DataRowVersion.Current) Dim o2 As Object = row("注文番号", DataRowVersion.Original) Dim o3 As Object = row("注文番号", DataRowVersion.Proposed) Dim o4 As Object = row("注文番号", DataRowVersion.Default)