Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42215

VS 2010 [RESOLVED] Using the GetRowCount Method with multiple runtime generated datagridview controls

$
0
0
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:

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

Thanks

Viewing all articles
Browse latest Browse all 42215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>