Solved

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

Posted on 2006-07-11
7
1,185 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
This is an explanation of a simple data model to help parse a JSON feed
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now