We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,697 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

datetime picker display data

hi
i have a question relating to a date time picker,
i have a form that i have the employee name and all the emaloyee details such as the employee DOB. whena user selects a user from the combo box the details from the database is being taken and displayed in the form. that thing is i have a date time picker and in the form load i have the code

dpDOB.Format = DateTimePickerFormat.Custom;
            dpDOB.CustomFormat = " ";

and in the datetime picker close up i have the code

dpDOB.Format = DateTimePickerFormat.Short;

and when it shows the data the datetime picker value does is not displayed, i have to click the datetime picker for the value to show up

how can i solve this.

thanks

2
Contributors
2
Replies
2 Days
Discussion Span
1 Year Ago
Last Updated
3
Views
Question
Answered
judithSampathwa
Posting Pro in Training
453 posts since May 2010
Reputation Points: 8
Solved Threads: 0
Skill Endorsements: 0

Add this line:
dpDOB.Format = DateTimePickerFormat.Short;
to the code that draws the info from the database. Just place under the rest and it should work. The problem at the moment is that you only have it in the dateTimePicker code segment which is only getting called when you click on it.

hericles
Veteran Poster
1,065 posts since Nov 2007
Reputation Points: 156
Solved Threads: 228
Skill Endorsements: 9

Add this line:
dpDOB.Format = DateTimePickerFormat.Short;
to the code that draws the info from the database. Just place under the rest and it should work. The problem at the moment is that you only have it in the dateTimePicker code segment which is only getting called when you click on it.

thanks

judithSampathwa
Posting Pro in Training
453 posts since May 2010
Reputation Points: 8
Solved Threads: 0
Skill Endorsements: 0
Question Answered as of 1 Year Ago by hericles

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0657 seconds using 2.63MB