Click here to Skip to main content
15,119,322 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: Datagridview cell not updating in Windows 2008 SP2 server Pin
harvid12-Apr-12 6:18
Memberharvid12-Apr-12 6:18 
GeneralRe: Datagridview cell not updating in Windows 2008 SP2 server Pin
Pete O'Hanlon12-Apr-12 6:51
mvePete O'Hanlon12-Apr-12 6:51 
GeneralRe: Datagridview cell not updating in Windows 2008 SP2 server Pin
harvid12-Apr-12 22:38
Memberharvid12-Apr-12 22:38 
GeneralRe: Datagridview cell not updating in Windows 2008 SP2 server Pin
Pete O'Hanlon12-Apr-12 23:10
mvePete O'Hanlon12-Apr-12 23:10 
GeneralRe: Datagridview cell not updating in Windows 2008 SP2 server Pin
harvid13-Apr-12 0:17
Memberharvid13-Apr-12 0:17 
AnswerRe: Datagridview cell not updating in Windows 2008 SP2 server Pin
Luc Pattyn13-Apr-12 2:58
sitebuilderLuc Pattyn13-Apr-12 2:58 
GeneralRe: Datagridview cell not updating in Windows 2008 SP2 server Pin
harvid13-Apr-12 4:05
Memberharvid13-Apr-12 4:05 
AnswerRe: Datagridview cell not updating in Windows 2008 SP2 server Pin
Luc Pattyn13-Apr-12 4:57
sitebuilderLuc Pattyn13-Apr-12 4:57 
1. Thank you for a bunch of code, unformatted code at that, where it is all about nested IFs and no visible indentation. There is no way to read and understand that as it stands. You should edit your message and apply PRE tags to the code.

2.
You should NOT be calling Application.DoEvents(). Not there, not anywhere. It is a very dangerous method, misunderstood by most everyone. If you think you need it, something is wrong with your code and adding it is bound to make things worse as it disturbs the natural flow of events. So remove it everywhere! And remove it completely, don't just turn it into a comment, as if there would still be some value left in it.

3.
If you are assigning new cell values in there, that will cause a new barrage of events being fired, which you probably don't want. You certainly don't want an avalanche of events (as a StackOverflow would result).

One way to handle it could be this:

Dim currentStatus as String = ...  ' save the content of status cell
Dim newStatus as String = currentStatus
...
' lots of conditional code, which does not change the status cell;
' if a new status is required, store it in newStatus.
...
If newStatus <> currentStatus
    ' now store the new status in its cell (this will cause more events, however there
    ' will be only one round of them as you now test for an actual change)
Endif


Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: Datagridview cell not updating in Windows 2008 SP2 server Pin
harvid16-Apr-12 4:01
Memberharvid16-Apr-12 4:01 
Question.... Pin
Arul R Ece11-Apr-12 0:42
MemberArul R Ece11-Apr-12 0:42 
GeneralRe: earthquake Pin
Pete O'Hanlon11-Apr-12 1:15
mvePete O'Hanlon11-Apr-12 1:15 
QuestionQuestion related to Windows Form Pin
Shikha Rani10-Apr-12 20:29
MemberShikha Rani10-Apr-12 20:29 
AnswerRe: Question related to Windows Form Pin
Abhinav S10-Apr-12 20:40
MemberAbhinav S10-Apr-12 20:40 
AnswerRe: Any suggestions about barcode generation? Pin
Richard MacCutchan14-Mar-12 2:25
mveRichard MacCutchan14-Mar-12 2:25 
QuestionDo any ad platforms exist for desktop apps? Pin
jeffb422-Mar-12 9:47
Memberjeffb422-Mar-12 9:47 
AnswerRe: Do any ad platforms exist for desktop apps? Pin
Dave Kreskowiak2-Mar-12 13:42
mveDave Kreskowiak2-Mar-12 13:42 
GeneralRe: Do any ad platforms exist for desktop apps? Pin
jeffb422-Mar-12 14:13
Memberjeffb422-Mar-12 14:13 
GeneralRe: Do any ad platforms exist for desktop apps? Pin
Dave Kreskowiak2-Mar-12 14:40
mveDave Kreskowiak2-Mar-12 14:40 
Question[VC++] Getting mouse position Pin
kctong5292-Mar-12 2:43
Memberkctong5292-Mar-12 2:43 
AnswerRe: [VC++] Getting mouse position Pin
Richard MacCutchan2-Mar-12 3:26
mveRichard MacCutchan2-Mar-12 3:26 
Questioni prefer vb.net Pin
isaacleye29-Feb-12 21:18
Memberisaacleye29-Feb-12 21:18 
AnswerRe: i prefer vb.net Pin
Pete O'Hanlon29-Feb-12 22:56
mvePete O'Hanlon29-Feb-12 22:56 
AnswerRe: i prefer vb.net Pin
Simon_Whale29-Feb-12 23:04
professionalSimon_Whale29-Feb-12 23:04 
AnswerRe: i prefer vb.net Pin
Abhinav S29-Feb-12 23:13
MemberAbhinav S29-Feb-12 23:13 
AnswerRe: i prefer vb.net Pin
thatraja1-Mar-12 8:46
professionalthatraja1-Mar-12 8:46 

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.