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

[RESOLVED] Datagridview Header

$
0
0
Hi,

On my datagridview cellmouseclick event I have this code:

Code:

Index = e.RowIndex
        Dim selectedRow As DataGridViewRow
        selectedRow = DgTenantDetails.Rows(index)

Now, at runtime when I click any cell on the header I receive the error message:

Code:

System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index'

What is wrong?

Thank you!

Viewing all articles
Browse latest Browse all 15174

Trending Articles



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