Format Date in BoundField

  • Thread starter stefanjohansson_2005
  • Start date
S

stefanjohansson_2005

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"
/>
 
S

stefanjohansson_2005

Found it! There is another setting called ApplyFormatInEditMode.

(e-mail address removed) skrev:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top