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.
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
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
TWO FRIGGIN' LINES, FOUR ING HOURS!
It's times like these I DON'T miss WinForms, no matter how bad front-end web development may be
They're worse than that!
They're the lowest of low, the scum of the WinForm controls, the most wretched, miserable, servile pathetic trash that was ever sh*t into programming!
When I did some serious development I used DevExpress controls.
Now that stuff was nice.
Great controls that worked like they were supposed to work.
I'm sure other vendors like Infragistics and Telerik have/had(?) similar controls.
But not the standard WinForm controls and especially not the DataGridView
It just occurred to me that it's rather refreshing that I've managed to avoid any discussion of today's elections (I'm in Canada) all day. I find myself somewhat surprised it hasn't been brought up at all, despite said policy.
Of course I had to be that guy by mentioning it. Carry on. Nothing to see here...
Seeing the Burger King "Impossible Whopper" is more expensive than the "real" Whopper makes me think that somewhere there is some executive trying to set it up to fail. Since 99% of people, even if they tasted exactly the same which reportedly they do, will buy the cheaper of the two options then the new impossible burger will fail to be a top seller simply because, even if it overcomes all other prejudices, it was too expensive.
I have not tried it myself because after some research I have found that, although it is much lower in cholesterol, it is significantly higher in sodium and just as much fat so brings no health benefits per se. Those weirdosvegans and vegetarian types who are not eating meat for so called "ethical reasons" should simply go elsewhere to eat - it's not like there aren't other choices available. BK do offer salads, they're pretty good actually. So why waste effort on Impossibles?
- I would love to change the world, but they won’t give me the source code.
There's been some articles lately that point out there's absolutely no health benefit to any of these so-called substitutes, and can in fact make things worse as they're high in sodium (as if the western diet didn't already have enough of that).
Personally it's the "beyond" nomenclature that bothers me. It's got this connotation that says this is just the first of many steps the elite want to impose on the rest of us slaves. The next one would be to have us all get our protein from insects, and laughing at us while they're still eating steaks.
I don't buy any of the "feel good" alternatives offered by those who want to make us feel guilty about how we live. I'm leaving it at that before it degenerates into soapbox material.
Admittedly, I know next to nothing about those things, though I see the many advertisements for them. The skeptic in me, though, thinks it would be more accurately labelled 'Beyond meat profits'.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
It's like they're trying to sell good food to people who don't want good food
There's lots of tasty vegetarian stuff out there and it doesn't taste like regular burgers.
And I actually consider that a plus!