Click here to Skip to main content
14,366,152 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralI've got the 5 year anniversary gift of the Windows Insider Program... Pin
Kornfeld Eliyahu Peter21-Oct-19 20:26
mveKornfeld Eliyahu Peter21-Oct-19 20:26 
GeneralRe: I've got the 5 year anniversary gift of the Windows Insider Program... Pin
BillWoodruff27-Oct-19 0:06
mveBillWoodruff27-Oct-19 0:06 
GeneralMini CCCs 138 Pin
Tim Deveaux21-Oct-19 19:20
memberTim Deveaux21-Oct-19 19:20 
GeneralRe: Mini CCCs 138 Pin
Rage22-Oct-19 2:13
professionalRage22-Oct-19 2:13 
GeneralRe: Mini CCCs 138 Pin
Tim Deveaux22-Oct-19 4:35
memberTim Deveaux22-Oct-19 4:35 
GeneralRe: Mini CCCs 138 Pin
DRHuff22-Oct-19 5:01
memberDRHuff22-Oct-19 5:01 
GeneralRe: Mini CCCs 138 - Done Pin
Tim Deveaux22-Oct-19 8:56
memberTim Deveaux22-Oct-19 8:56 
RantGAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
Sander Rossel21-Oct-19 12:05
professionalSander Rossel21-Oct-19 12:05 
So I just had to create a custom DataGridViewColumn for a custom control.
No prob, looked up an example and...
It's a date control and the calendar that opens is placed on the form and not on the control itself.
The effect is that the editor in the grid closes and the value from the calendar is never written back to the grid cell.
Again, no problem, I create an event when the calendar closes and write the value to the cell manually.
If it looks stupid and it works then it ain't stupid...

So anyway, all goes well, except...
When I set a second value the first value is reset.
I've spent an entire evening looking for the issue!
I've tried everything from looking at specific grid events, creating additional events, editing the bound object directly...

The issue was that when the calendar closed it was the last control in the tab order so it would return to the first control which reloads the screen on leave D'Oh! | :doh:
I switched two lines of code, first raise the event and then close the calendar, instead of the other way around.
It would now first select the grid and set the value and then close the calendar, worked like a charm Sigh | :sigh:

TWO FRIGGIN' LINES, FOUR Elephant | [mastadon] ING HOURS! Mad | :mad:
It's times like these I DON'T miss WinForms, no matter how bad front-end web development may be Unsure | :~

GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
PIEBALDconsult21-Oct-19 12:13
protectorPIEBALDconsult21-Oct-19 12:13 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
Sander Rossel21-Oct-19 12:20
professionalSander Rossel21-Oct-19 12:20 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
Member 1463095422-Oct-19 0:49
memberMember 1463095422-Oct-19 0:49 
GeneralDAGNABBIT! This is some smart SPAM! Pin
Sander Rossel22-Oct-19 2:00
professionalSander Rossel22-Oct-19 2:00 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
dandy7221-Oct-19 13:37
memberdandy7221-Oct-19 13:37 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
Sander Rossel21-Oct-19 22:56
professionalSander Rossel21-Oct-19 22:56 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
dandy7222-Oct-19 8:30
memberdandy7222-Oct-19 8:30 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
Johnny J.21-Oct-19 23:02
professionalJohnny J.21-Oct-19 23:02 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
Sander Rossel21-Oct-19 23:10
professionalSander Rossel21-Oct-19 23:10 
GeneralNo politics in the lounge Pin
dandy7221-Oct-19 10:58
memberdandy7221-Oct-19 10:58 
GeneralRe: No politics in the lounge Pin
RickZeeland21-Oct-19 11:02
mveRickZeeland21-Oct-19 11:02 
GeneralRe: No politics in the lounge Pin
Kent Sharkey21-Oct-19 11:46
staffKent Sharkey21-Oct-19 11:46 
GeneralRe: No politics in the lounge Pin
dandy7221-Oct-19 13:13
memberdandy7221-Oct-19 13:13 
GeneralRe: No politics in the lounge Pin
Kent Sharkey21-Oct-19 13:26
staffKent Sharkey21-Oct-19 13:26 
GeneralRe: No politics in the lounge Pin
dandy7221-Oct-19 13:31
memberdandy7221-Oct-19 13:31 
GeneralRe: No politics in the lounge Pin
Sander Rossel21-Oct-19 12:09
professionalSander Rossel21-Oct-19 12:09 
GeneralRe: No politics in the lounge Pin
ZurdoDev22-Oct-19 2:11
professionalZurdoDev22-Oct-19 2:11 

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.