我正在使用VB framework 2.0开发移动设备项目。 " DataGridView"是不可用的 - 它是我使用的DataGrid。
现在我想知道在选择行时如何做某事。我试图像这样做一些想法:
Private Sub MyGrid_CurrentCellChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyGrid.CurrentCellChanged
SelectedRow()
End Sub
Private Sub SelectedRow()
Dim SelectedRow As Integer = MyGrid.CurrentRowIndex
Dim numCellsSelected As Integer = 'How do i count the number of selected cells in the row above?
If *numCellsSelected on SelectedRow* = 5 Then '5 is the number of cells
MsgBox ("Row " & SelectedRow & " is selected!")
End If
End Sub
我是在正确的轨道上,和/或我该怎么做?