Click here to Skip to main content
15,905,963 members
Home / Discussions / C#
   

C#

 
GeneralRe: Formula Translation Pin
punitxsmart28-Apr-09 2:09
punitxsmart28-Apr-09 2:09 
GeneralRe: Formula Translation Pin
CPallini28-Apr-09 2:12
mveCPallini28-Apr-09 2:12 
QuestionMSBuild / Microsoft.Build... nyaaargh! Pin
Wenff28-Apr-09 1:32
professionalWenff28-Apr-09 1:32 
AnswerRe: MSBuild / Microsoft.Build... nyaaargh! Pin
SeMartens28-Apr-09 1:41
SeMartens28-Apr-09 1:41 
AnswerRe: MSBuild / Microsoft.Build... nyaaargh! Pin
Wenff29-Apr-09 6:00
professionalWenff29-Apr-09 6:00 
QuestionDataGridView index problem = VS2008 C# Pin
DlogDash28-Apr-09 1:08
DlogDash28-Apr-09 1:08 
AnswerRe: DataGridView index problem = VS2008 C# Pin
musefan28-Apr-09 2:20
musefan28-Apr-09 2:20 
GeneralRe: DataGridView index problem = VS2008 C# [modified] Pin
DlogDash28-Apr-09 11:27
DlogDash28-Apr-09 11:27 
Yes, literals work as expected.

This code to handle the CellClick event works as expected (currentRow and currentCol are declared as form properties).
private void vDateDataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
currentRow = e.RowIndex;
currentCol = e.ColumnIndex;
string str;
str = vDateDataGridView[currentCol, currentRow].Value.ToString();
selectedCellLabel.Text = str;
}
But when the following line is executed in the other event handler, currentRow behaves as before!
str = vDateDataGridView[currentCol, currentRow].Value.ToString();

The workaround is to declare currentRow and currentCol as local variables in the CellClick event handler, declare the variables I want to extract from the DataGridView as form properties and get their values in the CellClick event handler.

modified on Tuesday, April 28, 2009 5:55 PM
QuestionRegular Expression validator for currecny Pin
Member 254517628-Apr-09 1:03
Member 254517628-Apr-09 1:03 
AnswerRe: Regular Expression validator for currecny Pin
musefan28-Apr-09 2:16
musefan28-Apr-09 2:16 
GeneralRe: Regular Expression validator for currecny Pin
Member 254517628-Apr-09 2:20
Member 254517628-Apr-09 2:20 
GeneralRe: Regular Expression validator for currecny Pin
musefan28-Apr-09 2:48
musefan28-Apr-09 2:48 
GeneralRe: Regular Expression validator for currecny Pin
Member 254517629-Apr-09 18:00
Member 254517629-Apr-09 18:00 
QuestionAbout the certification validation period Pin
Roshanakak28-Apr-09 0:56
Roshanakak28-Apr-09 0:56 
QuestionUsing Block - Call Function Pin
dataminers28-Apr-09 0:46
dataminers28-Apr-09 0:46 
AnswerRe: Using Block - Call Function Pin
SeMartens28-Apr-09 0:51
SeMartens28-Apr-09 0:51 
QuestionHelp with drawing Pin
Johnny Jackson28-Apr-09 0:10
Johnny Jackson28-Apr-09 0:10 
AnswerRe: Help with drawing Pin
Henry Minute28-Apr-09 0:32
Henry Minute28-Apr-09 0:32 
AnswerRe: Help with drawing Pin
Bharat Jain28-Apr-09 0:34
Bharat Jain28-Apr-09 0:34 
AnswerRe: Help with drawing Pin
Rob Philpott28-Apr-09 0:56
Rob Philpott28-Apr-09 0:56 
GeneralRe: Help with drawing Pin
Johnny Jackson28-Apr-09 1:40
Johnny Jackson28-Apr-09 1:40 
GeneralRe: Help with drawing Pin
musefan28-Apr-09 2:04
musefan28-Apr-09 2:04 
GeneralRe: Help with drawing Pin
Johnny Jackson28-Apr-09 20:15
Johnny Jackson28-Apr-09 20:15 
GeneralRe: Help with drawing Pin
musefan28-Apr-09 22:01
musefan28-Apr-09 22:01 
GeneralRe: Help with drawing [modified] Pin
Johnny Jackson28-Apr-09 22:57
Johnny Jackson28-Apr-09 22:57 

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.