Vb.net VB DataGrid-选中行时
我正在使用VB framework 2.0开发一个移动设备项目。DataGridView不可用-它是我正在使用的DataGrid 现在,我想知道在选中一行时如何执行某些操作。我试着这样想:Vb.net VB DataGrid-选中行时,vb.net,datagrid,Vb.net,Datagrid,我正在使用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 S
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
我是否在正确的轨道上,和/或我如何做到这一点