2
我已阅读有关此主题的帖子的分数,但没有一个似乎解决了我的特定问题。我正在使用一个带有vb的wpf网格。这是我的事件处理程序:如何从DataGridCellInfo检索行索引
Private Sub dgrdMain_SelectedCellsChanged(sender As Object, e As SelectedCellsChangedEventArgs) Handles dgrMain.SelectedCellsChanged
If e.RemovedCells.Count > 0 Then
Dim ilRemovedCells As IList(Of DataGridCellInfo) = e.RemovedCells
For Each rc As DataGridCellInfo In ilRemovedCells
rc.Column.DisplayIndex 'This gives the column index
'How do I get the row index?
Next
End If
这里rc =已删除的单元格。我的问题是上面的注释行。
优秀,Codexer。 – SezMe
很高兴为你工作。 – Codexer