Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-07-11
7
Medium Priority
?
1,307 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
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
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…

722 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