Click here to Skip to main content
15,921,577 members
Home / Discussions / C#
   

C#

 
GeneralRe: Buttons appear differently in Vista than in XP (problem) Pin
sodevrom20-May-09 5:27
sodevrom20-May-09 5:27 
Questiondatagridview getting values Pin
sakis2419-May-09 13:21
sakis2419-May-09 13:21 
AnswerRe: datagridview getting values [modified] Pin
Christian Graus19-May-09 13:31
protectorChristian Graus19-May-09 13:31 
GeneralRe: datagridview getting values Pin
sakis2419-May-09 13:56
sakis2419-May-09 13:56 
GeneralRe: datagridview getting values Pin
sakis2419-May-09 14:21
sakis2419-May-09 14:21 
GeneralRe: datagridview getting values Pin
Mycroft Holmes19-May-09 14:34
professionalMycroft Holmes19-May-09 14:34 
GeneralRe: datagridview getting values Pin
sakis2419-May-09 14:50
sakis2419-May-09 14:50 
GeneralRe: datagridview getting values Pin
Mycroft Holmes19-May-09 15:38
professionalMycroft Holmes19-May-09 15:38 
This tells me you are using the cellcontentclick event. there is a similar event called CellClick that may serve you better
private void producerDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
string id = producerDataGridView.CurrentCell.Value.ToString();

MessageBox.Show(id);
}


Investigate the DataGridViewCellEventArgs e or sender. sender will be the cell that was clicked

You are using and event and then ignoring the content of the event and checking producerDataGridView.CurrentCell.Value.ToString();
Now the currentcell SHOULD be the cell you clicked but oh wait you trapped the CELLCONTENT event, is this guaranteed to point to the currentcell.

So basically you are peering into a bowl of spagetti and hoping you get the 2 end of the same strand. Use the correct event (this can be difficult to identify) and use the event to identify the cell



Never underestimate the power of human stupidity
RAH

QuestionDistributed Hosting Pin
Matt Cavanagh19-May-09 12:05
Matt Cavanagh19-May-09 12:05 
AnswerRe: Distributed Hosting Pin
Matty2219-May-09 15:48
Matty2219-May-09 15:48 
GeneralRe: Distributed Hosting Pin
Matt Cavanagh19-May-09 20:39
Matt Cavanagh19-May-09 20:39 
QuestionIs it possible to Convert from Windows Application to a Mobile Device Application? Pin
Star0919-May-09 11:35
Star0919-May-09 11:35 
AnswerRe: Is it possible to Convert from Windows Application to a Mobile Device Application? Pin
led mike19-May-09 11:55
led mike19-May-09 11:55 
GeneralRe: Is it possible to Convert from Windows Application to a Mobile Device Application? Pin
Star0919-May-09 11:57
Star0919-May-09 11:57 
GeneralRe: Is it possible to Convert from Windows Application to a Mobile Device Application? Pin
led mike19-May-09 11:59
led mike19-May-09 11:59 
GeneralRe: Is it possible to Convert from Windows Application to a Mobile Device Application? Pin
Eddy Vluggen19-May-09 12:02
professionalEddy Vluggen19-May-09 12:02 
AnswerRe: Is it possible to Convert from Windows Application to a Mobile Device Application? Pin
DaveyM6919-May-09 12:21
professionalDaveyM6919-May-09 12:21 
QuestionRename folder Pin
netJP12L19-May-09 10:03
netJP12L19-May-09 10:03 
AnswerRe: Rename folder Pin
Moreno Airoldi19-May-09 10:21
Moreno Airoldi19-May-09 10:21 
AnswerRe: Rename folder Pin
Dave Kreskowiak19-May-09 10:25
mveDave Kreskowiak19-May-09 10:25 
GeneralRe: Rename folder [modified] Pin
netJP12L19-May-09 10:42
netJP12L19-May-09 10:42 
GeneralRe: Rename folder Pin
Moreno Airoldi19-May-09 11:00
Moreno Airoldi19-May-09 11:00 
GeneralRe: Rename folder Pin
netJP12L19-May-09 11:09
netJP12L19-May-09 11:09 
GeneralRe: Rename folder Pin
Eddy Vluggen19-May-09 12:10
professionalEddy Vluggen19-May-09 12:10 
GeneralRe: Rename folder Pin
Moreno Airoldi19-May-09 21:37
Moreno Airoldi19-May-09 21:37 

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.