Computing.Net > Forums > Programming > Visual Basic Get selected datagridview number

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Visual Basic Get selected datagridview number

Reply to Message Icon

Name: pball
Date: May 19, 2009 at 04:34:30 Pacific
OS: Windows XP
CPU/Ram: 2.8 ghz / 2 gig
Product: Home made / NONE
Subcategory: General
Comment:

Haven't seen much VB around here but I'll take a shot.

I have a datagridview and I have it set up so you can only select whole rows. I need to get the index number of the currently selected row. I can not find by luck or search a way to return the row number. Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: pball
Date: May 19, 2009 at 05:10:34 Pacific
Reply:

Well of course right after I ask a question I find the answer to it.

DataGridView1.CurrentCell.RowIndex
That gives the index of the currently selected row and is way off what I'd though it'd be.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Visual Basic Get selected datagridview number

Visual Basics Password Generator www.computing.net/answers/programming/visual-basics-password-generator/11929.html

visual basic and access www.computing.net/answers/programming/visual-basic-and-access/3097.html

Visual Basic 2005, write to file www.computing.net/answers/programming/visual-basic-2005-write-to-file/17181.html