Click here to Skip to main content
15,887,676 members
Home / Discussions / C#
   

C#

 
AnswerRe: TreeView SelectedNode[0] Pin
Mycroft Holmes13-Jan-11 21:27
professionalMycroft Holmes13-Jan-11 21:27 
AnswerRe: TreeView SelectedNode[0] Pin
Richard MacCutchan13-Jan-11 22:08
mveRichard MacCutchan13-Jan-11 22:08 
AnswerRe: TreeView SelectedNode[0] Pin
RaviRanjanKr16-Jan-11 2:28
professionalRaviRanjanKr16-Jan-11 2:28 
GeneralRe: TreeView SelectedNode[0] Pin
S078416-Jan-11 19:53
S078416-Jan-11 19:53 
QuestionC# How to get row value of DataGridView Pin
LAPEC13-Jan-11 12:46
LAPEC13-Jan-11 12:46 
AnswerRe: C# How to get row value of DataGridView Pin
Dalek Dave13-Jan-11 13:05
professionalDalek Dave13-Jan-11 13:05 
AnswerRe: C# How to get row value of DataGridView Pin
Luc 64801113-Jan-11 15:10
Luc 64801113-Jan-11 15:10 
AnswerRe: C# How to get row value of DataGridView Pin
Luc 64801113-Jan-11 15:14
Luc 64801113-Jan-11 15:14 
Hi,

something is wrong in the C# forum right now, so this message will not show as is, until things get fixed, and you won't be able to react either, you could however start a new thread if necessary.

My reply is rather simple: inside the ContentClicked handler, you know the row and column index of the cell you clicked; and you can access the Rows, Columns, and Cells arrays using integer indices. So you probably want
value=dataGridView1.Rows[e.RowIndex].Cells[the_index_of_the_column_you_want];


You may need a .Value at the end. Hope this helps.

Smile | :)
AnswerRe: C# How to get row value of DataGridView Pin
Dalek Dave13-Jan-11 15:33
professionalDalek Dave13-Jan-11 15:33 
AnswerRe: C# How to get row value of DataGridView Pin
Luc Pattyn13-Jan-11 15:50
sitebuilderLuc Pattyn13-Jan-11 15:50 
QuestionMost efficient Collection? Pin
kinar13-Jan-11 10:41
kinar13-Jan-11 10:41 
AnswerRe: Most efficient Collection? PinPopular
dan!sh 13-Jan-11 11:20
professional dan!sh 13-Jan-11 11:20 
AnswerRe: Most efficient Collection? Pin
Luc Pattyn13-Jan-11 11:28
sitebuilderLuc Pattyn13-Jan-11 11:28 
AnswerRe: Most efficient Collection? Pin
Ray Cassick13-Jan-11 11:54
Ray Cassick13-Jan-11 11:54 
AnswerRe: Most efficient Collection? Pin
SledgeHammer0113-Jan-11 13:00
SledgeHammer0113-Jan-11 13:00 
AnswerRe: Most efficient Collection? Pin
Dalek Dave13-Jan-11 13:08
professionalDalek Dave13-Jan-11 13:08 
GeneralOT [ sufficiently remedied for now ] Pin
Luc Pattyn13-Jan-11 13:15
sitebuilderLuc Pattyn13-Jan-11 13:15 
GeneralRe: Most efficient Collection? Pin
Dalek Dave13-Jan-11 13:18
professionalDalek Dave13-Jan-11 13:18 
GeneralRe: Most efficient Collection? Pin
Luc Pattyn13-Jan-11 13:23
sitebuilderLuc Pattyn13-Jan-11 13:23 
AnswerRe: Most efficient Collection? Pin
jschell14-Jan-11 10:09
jschell14-Jan-11 10:09 
QuestionHaving trouble writing to an excel file Pin
turbosupramk313-Jan-11 9:40
turbosupramk313-Jan-11 9:40 
AnswerRe: Having trouble writing to an excel file Pin
Dalek Dave13-Jan-11 10:31
professionalDalek Dave13-Jan-11 10:31 
QuestionDuplicate media player winodw Pin
polycom12313-Jan-11 8:25
polycom12313-Jan-11 8:25 
QuestionHow Do I get IME to open my custom IME UI Windows in C# [modified] Pin
greg ofiesh13-Jan-11 7:48
greg ofiesh13-Jan-11 7:48 
QuestionCalling C++ Image API from C# Pin
econner13-Jan-11 4:59
econner13-Jan-11 4:59 

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.