Click here to Skip to main content
15,889,403 members
Home / Discussions / C#
   

C#

 
AnswerRe: Execute a command in command prompt from C# Pin
Spunky Coder6-May-09 22:42
Spunky Coder6-May-09 22:42 
GeneralRe: Execute a command in command prompt from C# Pin
tolw6-May-09 22:52
tolw6-May-09 22:52 
GeneralRe: Execute a command in command prompt from C# Pin
Spunky Coder6-May-09 23:03
Spunky Coder6-May-09 23:03 
GeneralRe: Execute a command in command prompt from C# Pin
Mc_Topaz7-May-09 3:52
Mc_Topaz7-May-09 3:52 
GeneralRe: Execute a command in command prompt from C# Pin
Mc_Topaz7-May-09 3:51
Mc_Topaz7-May-09 3:51 
AnswerRe: Execute a command in command prompt from C# Pin
dan!sh 6-May-09 22:59
professional dan!sh 6-May-09 22:59 
AnswerRe: Execute a command in command prompt from C# Pin
khoanguyen12-Oct-09 18:51
khoanguyen12-Oct-09 18:51 
GeneralWierd DataGridView processing with a thread Pin
Mycroft Holmes6-May-09 22:06
professionalMycroft Holmes6-May-09 22:06 
I have a DGV with checkboxes, a method processes each row and when complete unchecks the row.

This works fine, click the button and the form freezes and returns sometime later with all the boxes unchecked.

Now I introduce a separate thread to do the processing, split out the UI update and use the following to uncheck each row as it completes.

            this.BeginInvoke((MethodInvoker)delegate
            {
                // this will be on main thread
                UpdateGrid(oRow, iRecords);
            });

private void UpdateGrid(DataGridViewRow oRow, int iRecords)
{
    oRow.Cells["Records"].Value = iRecords;
    oRow.Cells["Sel"].Value = false;
}


This works fine EXCEPT the first row (which happens to be selected but this is irrelevant) does not uncheck.

Slap a break point on and the index is hit and the first row is unchecked properly so I hit F5. Now the 2nd row is left checked. Seems there is an interaction between the debugger and the thread processing.

Has anyone else seen this type of behaviour?


Never underestimate the power of human stupidity
RAH

Questionget SQL Insert Query Pin
Abdul Rahman Hamidy6-May-09 21:40
Abdul Rahman Hamidy6-May-09 21:40 
AnswerRe: get SQL Insert Query Pin
Rob Philpott6-May-09 22:49
Rob Philpott6-May-09 22:49 
GeneralRe: get SQL Insert Query Pin
Abdul Rahman Hamidy6-May-09 23:12
Abdul Rahman Hamidy6-May-09 23:12 
Questioncall .wcp (help file) Pin
lost_in_code6-May-09 21:22
lost_in_code6-May-09 21:22 
AnswerRe: call .wcp (help file) Pin
Spunky Coder6-May-09 21:57
Spunky Coder6-May-09 21:57 
QuestionDataGridView Calculations Pin
nagendra.vk6-May-09 21:21
nagendra.vk6-May-09 21:21 
AnswerRe: DataGridView Calculations Pin
Mycroft Holmes6-May-09 22:12
professionalMycroft Holmes6-May-09 22:12 
QuestionI have problems in word automation Pin
Roshanakak6-May-09 21:09
Roshanakak6-May-09 21:09 
QuestionPBX VOIP Pin
imranliaqat6-May-09 20:16
imranliaqat6-May-09 20:16 
JokeRe: PBX VOIP Pin
Dino Mulahusic6-May-09 20:47
professionalDino Mulahusic6-May-09 20:47 
QuestionUsing open office in .net Pin
tauras816-May-09 19:53
tauras816-May-09 19:53 
AnswerRe: Using open office in .net Pin
N a v a n e e t h6-May-09 20:44
N a v a n e e t h6-May-09 20:44 
AnswerRe: Using open office in .net Pin
Rajesh R Subramanian7-May-09 0:34
professionalRajesh R Subramanian7-May-09 0:34 
QuestionSolving vehicle routing problem in .NET (C#) Pin
Andisheh_K6-May-09 19:49
Andisheh_K6-May-09 19:49 
QuestionRe: Solving vehicle routing problem in .NET (C#) Pin
Andisheh_K9-May-09 1:39
Andisheh_K9-May-09 1:39 
Questionconvert.ToInt32 Pin
yueru6-May-09 18:57
yueru6-May-09 18:57 
AnswerRe: convert.ToInt32 Pin
dotnetmember6-May-09 19:54
dotnetmember6-May-09 19:54 

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.