DataGridView에서 선택한 셀을 기반으로 행 인덱스를 가져 오려고합니다. VB.NET에서 어떻게 할 수 있습니까?DataGridView에서 선택한 셀을 기반으로 RowIndex 가져 오기
이 내가 가진 무엇 :
Dim iRowIndex As Integer
For i = 0 To Me.grdTransaction.SelectedCells.Item(iRowIndex)
iRowIndex = Me.grdTransaction.SelectedCells.Item(i).RowIndex.ToString()
Dim s As String = Me.grdTransaction.SelectedRows(i).Cells("DataGridViewTextBoxColumn6").Value
aList.Add(s)
MsgBox("Row index " & iRowIndex)
Next
감사를 작동합니다. 나는 ArgumentsOutofRange 예외를 얻고있다. – alwaysVBNET
@nectarines .. argh .. 나는 그것을 잊어 버렸다. .. – matzone