Solved

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

Posted on 2006-07-11
7
1,244 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 125 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is about my first experience with programming Arduino.
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.
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 …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

751 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