Solved

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

Posted on 2006-07-11
7
1,152 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
This is about my first experience with programming Arduino.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
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…

705 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

19 Experts available now in Live!

Get 1:1 Help Now