I have multiple runtime generated datagridview controls and I would like to be able to see if the user has selected multiple rows in a specific datagridview. For some reason, the result of the following is always zero. When I F9 stop the program, I can see that the selected value of this datagridview row is false. Any ideas how to fix this?
My code is as follows:
Thanks
My code is as follows:
Code:
strDGVName = "dgvCheckpoint" & intTimeModificationSender
For Each tbp As TabPage In frmTimingP2P.tabctrlTimingTable.Controls
For Each dgv In tbp.Controls
If dgv.Name = strDGVName Then
intSelectedRowCount = dgv.Rows.GetRowCount(DataGridViewElementStates.Selected)
End If
Next
Next