Hi
I have a gridview in my asp.net webapplication (I'm using VS2008) and from my sql server database it populates that gridview. I'm doing a time registration application and my columns are "date" "time beginning" "time ending" etc.
My issue is when I want to edit a row and let say I want to enter a new time beginning for example it then shows like this: 2010-01-18 07:00:00.
Now I have to be careful, if I delete all in that textbox (in the gridview) and enter let say: 08:00:00 and then push update button, it will then change my date as well to the date of today like this 2010-04-05 08:00:00.
I only want to have the time, but it gives me both date and time. Is there some way to change that?
I could for example change the display text in the gridview using this formatting: {0:HH:mm}, but in edit mode it displays both date and time.
Thank you.

1 answers
As well as setting the DateFormatString property to a 'time only' format, I think you'll also need to set the following properties:
1. HtmlEncode to "false".
2. ApplyFormatInEditMode to "true".
answered one year ago by:
17279
60
Thank you Vulpes, works perfect.