Click here to Skip to main content
15,892,674 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 19:26
professionalKornfeld Eliyahu Peter21-Oct-19 19:26 
GeneralRe: I've got the 5 year anniversary gift of the Windows Insider Program... Pin
BillWoodruff26-Oct-19 23:06
professionalBillWoodruff26-Oct-19 23:06 
GeneralMini CCCs 138 Pin
Tim Deveaux21-Oct-19 18:20
Tim Deveaux21-Oct-19 18:20 
GeneralRe: Mini CCCs 138 Pin
Rage22-Oct-19 1:13
professionalRage22-Oct-19 1:13 
GeneralRe: Mini CCCs 138 Pin
Tim Deveaux22-Oct-19 3:35
Tim Deveaux22-Oct-19 3:35 
GeneralRe: Mini CCCs 138 Pin
DRHuff22-Oct-19 4:01
DRHuff22-Oct-19 4:01 
GeneralRe: Mini CCCs 138 - Done Pin
Tim Deveaux22-Oct-19 7:56
Tim Deveaux22-Oct-19 7:56 
RantGAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
Sander Rossel21-Oct-19 11:05
professionalSander Rossel21-Oct-19 11: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 11:13
mvePIEBALDconsult21-Oct-19 11:13 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
Sander Rossel21-Oct-19 11:20
professionalSander Rossel21-Oct-19 11:20 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
Member 1463095421-Oct-19 23:49
Member 1463095421-Oct-19 23:49 
GeneralDAGNABBIT! This is some smart SPAM! Pin
Sander Rossel22-Oct-19 1:00
professionalSander Rossel22-Oct-19 1:00 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
dandy7221-Oct-19 12:37
dandy7221-Oct-19 12:37 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
Sander Rossel21-Oct-19 21:56
professionalSander Rossel21-Oct-19 21:56 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
dandy7222-Oct-19 7:30
dandy7222-Oct-19 7:30 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
Johnny J.21-Oct-19 22:02
professionalJohnny J.21-Oct-19 22:02 
GeneralRe: GAAAAHHHH!!! When the problem is PEBCAK! (and also WinForms) Pin
Sander Rossel21-Oct-19 22:10
professionalSander Rossel21-Oct-19 22:10 
GeneralNo politics in the lounge Pin
dandy7221-Oct-19 9:58
dandy7221-Oct-19 9:58 
GeneralRe: No politics in the lounge Pin
RickZeeland21-Oct-19 10:02
mveRickZeeland21-Oct-19 10:02 
GeneralRe: No politics in the lounge Pin
Kent Sharkey21-Oct-19 10:46
staffKent Sharkey21-Oct-19 10:46 
GeneralRe: No politics in the lounge Pin
dandy7221-Oct-19 12:13
dandy7221-Oct-19 12:13 
GeneralRe: No politics in the lounge Pin
Kent Sharkey21-Oct-19 12:26
staffKent Sharkey21-Oct-19 12:26 
GeneralRe: No politics in the lounge Pin
dandy7221-Oct-19 12:31
dandy7221-Oct-19 12:31 
GeneralRe: No politics in the lounge Pin
Sander Rossel21-Oct-19 11:09
professionalSander Rossel21-Oct-19 11:09 
GeneralRe: No politics in the lounge Pin
ZurdoDev22-Oct-19 1:11
professionalZurdoDev22-Oct-19 1: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.