Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   Format Date in BoundField (http://www.velocityreviews.com/forums/t763080-format-date-in-boundfield.html)

stefanjohansson_2005@yahoo.se 12-08-2006 03:06 PM

Format Date in BoundField
 
I have the code below to display and format a date column in a
GridView. This works when the GridView is in read mode. But when I
select Edit the date is no longer formated with DataFormatString. What
should I do?

<asp:BoundField DataField="StartDate" HeaderText="StartDate"
SortExpression="StartDate" DataFormatString="{0:d}" HtmlEncode="False"
/>


stefanjohansson_2005@yahoo.se 12-12-2006 12:56 PM

Re: Format Date in BoundField
 
Found it! There is another setting called ApplyFormatInEditMode.

stefanjohansson_2005@yahoo.se skrev:

> I have the code below to display and format a date column in a
> GridView. This works when the GridView is in read mode. But when I
> select Edit the date is no longer formated with DataFormatString. What
> should I do?
>
> <asp:BoundField DataField="StartDate" HeaderText="StartDate"
> SortExpression="StartDate" DataFormatString="{0:d}" HtmlEncode="False"
> />




All times are GMT. The time now is 12:28 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.