Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to display both time and date in datagridview column .at the same time it should be editable also.I tried with the code provided in MSDN link. but it shows the date only. it shows time as 12:00 and it is not editable too. the code which i used is given below

http://msdn.microsoft.com/en-us/library/7tas5c80.aspx[^]

but this code i am able to retrieve only date information
Posted
Updated 4-Oct-11 2:32am
v2
Comments
[no name] 4-Oct-11 8:32am    
Long block of unformatted code removed and replaced with link to MSDN page where it was copied from.

Please set the format to your column to yyyy/MM/dd HH:mm
 
Share this answer
 
Comments
[no name] 4-Oct-11 8:47am    
but when i click on any cell in this column a dropdown calendar appears which make me to edit only date information . i wnt to edit time too. what should i adjust to edit the time please help somebdy
NewPast 5-Oct-11 1:43am    
dot your datepicker to edit the time and date just use simple textbox
[no name] 5-Oct-11 7:54am    
And what if the UI design called for a calendar? What about validation? Not a very good suggestion.
[no name] 4-Oct-11 8:52am    
when the cell is not clicked it shows time (some default time). but when it is clicked a calendar is appears which do not have any provision to update time
 
Share this answer
 
Comments
[no name] 4-Oct-11 9:03am    
but when i click on any cell in this column a dropdown calendar appears which make me to edit only date information . i wnt to edit time too. what should i adjust to edit the time please help somebdy
[no name] 4-Oct-11 9:03am    
when the cell is not clicked it shows time (some default time). but when it is clicked a calendar is appears which do not have any provision to update time
[no name] 4-Oct-11 12:00pm    
Yes, the default calendar control does not have Time. You need to use a third-party control or make two fields
[no name] 4-Oct-11 9:04am    
please somebody help i stuck up
[no name] 4-Oct-11 12:02pm    
two fields means a seperate column for time ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900