Click here to Skip to main content
15,922,584 members
Home / Discussions / C#
   

C#

 
Questiondll security flaw Pin
ferroariel28-Apr-09 3:30
ferroariel28-Apr-09 3:30 
Question[Message Deleted] Pin
bhargava240928-Apr-09 3:01
bhargava240928-Apr-09 3:01 
AnswerRe: 3D Auto Cadd viewer Pin
musefan28-Apr-09 3:05
musefan28-Apr-09 3:05 
AnswerRe: 3D Auto Cadd viewer Pin
Simon P Stevens28-Apr-09 3:49
Simon P Stevens28-Apr-09 3:49 
General[Message Deleted] Pin
bhargava240930-Apr-09 2:02
bhargava240930-Apr-09 2:02 
GeneralRe: 3D Auto Cadd viewer Pin
Simon P Stevens30-Apr-09 2:50
Simon P Stevens30-Apr-09 2:50 
QuestionSolid Works Image To My C# Project Pin
bhargava240928-Apr-09 2:58
bhargava240928-Apr-09 2:58 
AnswerRe: Solid Works Image To My C# Project Pin
musefan28-Apr-09 3:03
musefan28-Apr-09 3:03 
GeneralRe: Solid Works Image To My C# Project Pin
bhargava240930-Apr-09 2:24
bhargava240930-Apr-09 2:24 
GeneralRe: Solid Works Image To My C# Project Pin
bunyaminasd24-Nov-09 21:25
bunyaminasd24-Nov-09 21:25 
Questionhow we reterive image from sql database using browse button Pin
shomic.goyal28-Apr-09 2:44
shomic.goyal28-Apr-09 2:44 
AnswerRe: how we reterive image from sql database using browse button Pin
jaipurguy128-Apr-09 2:47
jaipurguy128-Apr-09 2:47 
AnswerRe: how we reterive image from sql database using browse button Pin
musefan28-Apr-09 2:53
musefan28-Apr-09 2:53 
GeneralRe: how we reterive image from sql database using browse button Pin
shomic.goyal28-Apr-09 3:04
shomic.goyal28-Apr-09 3:04 
GeneralRe: how we reterive image from sql database using browse button Pin
musefan28-Apr-09 3:07
musefan28-Apr-09 3:07 
AnswerRe: how we reterive image from sql database using browse button Pin
nagendra.vk28-Apr-09 5:43
nagendra.vk28-Apr-09 5:43 
QuestionProblem to display Master-Details rows. Pin
hdv21228-Apr-09 2:41
hdv21228-Apr-09 2:41 
QuestionFormula Translation Pin
punitxsmart28-Apr-09 1:56
punitxsmart28-Apr-09 1:56 
AnswerRe: Formula Translation Pin
CPallini28-Apr-09 1:58
mveCPallini28-Apr-09 1:58 
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 
Has anyone else had issues similar to this?
If a row is selected in the DataGridView on a form the following event handling code correctly gets the index value of the row. However, the code to extract values from the row actually gets values from the next row. For example if the fourth row is selected, index has the correct value of 3 but the row values are from the fifth row. Decrementing the value returned from vDateDataGridView.CurrentRow.Index then referenced the third row! Decrementing and then incrementing the value again referenced the fifth row. If the index value is assigned from a constant (e.g. index = 3), the problem does not occur.

string str;
int index;
index = vDateDataGridView.CurrentRow.Index;// gives correct index
str = vDateDataGridView.Rows[index].Cells[0].Value.ToString();
str = vDateDataGridView[0, index].Value.ToString();

CurrentRow.Index supposedly returns an int, but this behaviour suggests rounding issues or similar. Recasting after using the CurrentRow.Index.ToString() function did not make any difference.

I have replicated this behaviour in a fresh form in the same project. The underlying data source is a View joining three tables. I will see if the same problem occurs with a single table datasource. Yes, it did.

Tony Horsham

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.