Click here to Skip to main content
15,915,834 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: vb.net Pin
kubben4-Jun-07 2:26
kubben4-Jun-07 2:26 
AnswerRe: vb.net Pin
Christian Graus4-Jun-07 2:52
protectorChristian Graus4-Jun-07 2:52 
Questiona question about row-index Pin
vbbeg4-Jun-07 1:47
vbbeg4-Jun-07 1:47 
AnswerRe: a question about row-index Pin
Dave Kreskowiak4-Jun-07 4:06
mveDave Kreskowiak4-Jun-07 4:06 
GeneralRe: a question about row-index Pin
vbbeg4-Jun-07 4:56
vbbeg4-Jun-07 4:56 
GeneralRe: a question about row-index Pin
Dave Kreskowiak4-Jun-07 6:32
mveDave Kreskowiak4-Jun-07 6:32 
GeneralRe: a question about row-index Pin
vbbeg4-Jun-07 7:11
vbbeg4-Jun-07 7:11 
GeneralRe: a question about row-index Pin
Dave Kreskowiak4-Jun-07 8:09
mveDave Kreskowiak4-Jun-07 8:09 
You do not need the row number at all. Once you have to DataGridViewRow, you have the ENTIRE record that was clicked on. Every field that the grid was bound to in is that row object. So
Dim phone as String = cell.OwningRow.Cells("phone").Value

gives you the Phone column of the row that was clicked on. The example, of course, assumes that the Value property in that column returns a String. You'll have to change it to match whatever you're expecting.

You don't need to go to the table to get the rest of the fields.



A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: a question about row-index Pin
Dave Kreskowiak4-Jun-07 13:33
mveDave Kreskowiak4-Jun-07 13:33 
GeneralRe: a question about row-index Pin
vbbeg4-Jun-07 17:24
vbbeg4-Jun-07 17:24 
QuestionProblem in adding dll files Pin
Nanda16054-Jun-07 0:59
Nanda16054-Jun-07 0:59 
AnswerRe: Problem in adding dll files Pin
WhiteGirl234-Jun-07 2:07
WhiteGirl234-Jun-07 2:07 
GeneralRe: Problem in adding dll files Pin
Nanda16054-Jun-07 2:17
Nanda16054-Jun-07 2:17 
GeneralRe: Problem in adding dll files Pin
Dave Kreskowiak4-Jun-07 4:05
mveDave Kreskowiak4-Jun-07 4:05 
Questionhelp! Pin
daredevil_beware164-Jun-07 0:55
daredevil_beware164-Jun-07 0:55 
AnswerRe: help! Pin
Christian Graus4-Jun-07 1:47
protectorChristian Graus4-Jun-07 1:47 
GeneralRe: help! Pin
daredevil_beware164-Jun-07 1:51
daredevil_beware164-Jun-07 1:51 
GeneralRe: help! Pin
Christian Graus4-Jun-07 2:54
protectorChristian Graus4-Jun-07 2:54 
GeneralRe: help! Pin
Sathesh Sakthivel4-Jun-07 3:05
Sathesh Sakthivel4-Jun-07 3:05 
QuestionRe: help! Pin
Sonia Gupta4-Jun-07 2:00
Sonia Gupta4-Jun-07 2:00 
AnswerRe: help! Pin
Sathesh Sakthivel4-Jun-07 3:21
Sathesh Sakthivel4-Jun-07 3:21 
AnswerRe: help! Pin
daredevil_beware164-Jun-07 2:58
daredevil_beware164-Jun-07 2:58 
GeneralRe: help! Pin
Sathesh Sakthivel4-Jun-07 3:07
Sathesh Sakthivel4-Jun-07 3:07 
GeneralRe: help! Pin
daredevil_beware164-Jun-07 3:11
daredevil_beware164-Jun-07 3:11 
GeneralRe: help! Pin
Sathesh Sakthivel4-Jun-07 3:18
Sathesh Sakthivel4-Jun-07 3:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.