Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Add a Time only picker control column into DataGridView control in c#

Posted on 2006-07-11
7
Medium Priority
?
1,333 Views
Last Modified: 2008-05-21
Dear experts,
I would like to know how to create and add a Time only picker control column into DataGridView control in c#

thx
0
Comment
Question by:jeff_ching
  • 3
  • 3
7 Comments
 
LVL 4

Expert Comment

by:Ariful Ambia
ID: 17084894
Hi

Can u use standard DateTimePicker in Gird? If u can do that in the next step just change the "Format" property of the DateTimePicker to "Time". That’s it.

Enjoy

Noman
0
 
LVL 15

Expert Comment

by:bpmurray
ID: 17084942
I think this is what you want - it has source too: http://www.codeproject.com/aspnet/outlooktimefield.asp
0
 

Author Comment

by:jeff_ching
ID: 17086728
Dear all experts,
Thx for the comments.

Let me state the details:
1. I am working on a window form project not asp.net
2. I need the column in datagridview control
3. The column should get some kinds of UI to let use select or input the time value rather than just display the time value.

By the way, I had tried to create a user control and add into the datagridview control but the event handling is too hard for me.

thx
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 4

Expert Comment

by:Ariful Ambia
ID: 17087142

Dear Jeff_ching

u don't need to create new user control. follow my instruction I believe u will get result.

Noman
0
 

Author Comment

by:jeff_ching
ID: 17092767
Dear Noman,
I do try your method, but it only display the time values only. When I clicking the contro's drop down button it only show a calendar which still cannot allow me to select time value. May be I mis-set the control's attributes. Can you show me the way?

thx
0
 
LVL 4

Accepted Solution

by:
Ariful Ambia earned 500 total points
ID: 17093106
Hi

add this code

DateTimePicker1.ShowUpDown=True


Hope this will work

Noman
0
 

Author Comment

by:jeff_ching
ID: 17109062
Hi Noman,
Thank you very much, it works! ^_^
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Progress

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question