Hi everyone,
Want a DateTimePicker column in my DataGridView.
Essentially used code I found on MSDN here
Just dropped the different classes in separate files.
It works, but the problem is I have to click from 2 to 4 times before I can select a date! The first click shows the DateTimePicker and then you have to click again to select a date.
Does anyone have any idea how I can let look all the cells in the column like the one in the bottom(see screenshot)?
Thanks in advance.
ddanbe 2,724 Professional Procrastinator Featured Poster
Recommended Answers
Jump to PostWhat about if you made the datetime picker invoke the popup date selector on the first click of the cell instead of showing the editor glyph on all of the columns? I use a third party set of controls that provides the behavior you're describing -- but implemented the way …
Jump to PostHere is a video of the functionality i'm describing. Notice how when I click on the left part of the control it creates the editor and shows the glyph. But if I click on another row where the glyph should be it automatically invokes the editor.
Jump to PostMaybe your code needs,
dataGridView1.EditMode = DataGridViewEditMode.EditOnEnter;
Jump to PostThe last one had a bug, I didn't check which mouse button was down. The right doesn't fire a row selection change the way I had it setup but it can. Try this one.
This also only fires off if they click on right 15 pixels which is the …
All 13 Replies
DdoubleD 315 Posting Shark
ddanbe 2,724 Professional Procrastinator Featured Poster
sknake 1,622 Senior Poster Featured Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
sknake 1,622 Senior Poster Featured Poster
kvprajapati 1,826 Posting Genius Team Colleague
ddanbe 2,724 Professional Procrastinator Featured Poster
sknake 1,622 Senior Poster Featured Poster
sknake 1,622 Senior Poster Featured Poster
sknake 1,622 Senior Poster Featured Poster
ddanbe commented: Will send you some Duvel this X-mass :) +14
ddanbe 2,724 Professional Procrastinator Featured Poster
sknake 1,622 Senior Poster Featured Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.