troubleshooting Question

Tracking a row in a DataGridView regardless of sort?

Avatar of JasonWilliam
JasonWilliam asked on
.NET ProgrammingVisual Basic.NET
9 Comments1 Solution246 ViewsLast Modified:
Hey all.  I'm trying to figure out how to track a row, regardless of how a user may sort my datagridview.  In other words, lets say I have a sample table that looks like this:

#    Name    Notes
1    John     Good guy
2    Jane     Good girl
3    Dawn   Bad girl

If I were do get the value of row 0, column "Name", I get "John" as I expect

Now, lets say the user sorts on the "#" column, so the table now looks like this:
#    Name    Notes
3    Dawn   Bad girl
2    Jane     Good girl
1    John     Good guy

If I execute that same get statement, I now get "Dawn" instead of "John".  

My question is, how do I always make sure I get "John"?
ASKER CERTIFIED SOLUTION
appari

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros