Groups | Blog | Home
all groups > asp.net webcontrols > november 2005 >

asp.net webcontrols : GridView DataFormatString not formatting


AcaBrian
11/4/2005 5:36:58 PM
Formatting of column values was working fine with Beta 2 but is not working
danhur
11/19/2005 6:56:21 PM

Did you figure out whats wrong? Same thing is happening to me

--
danhu
-----------------------------------------------------------------------
danhur's Profile: http://www.hightechtalks.com/m31
View this thread: http://www.hightechtalks.com/t227804
leemeyers NO[at]SPAM gmail.com
11/21/2005 12:12:45 PM
For anyone else looking for the answer to this, set the value of the
HtmlEncode attribute of the BoundField control to false, as in:

<asp:BoundField DataField="StartDate" DataFormatString="{0:MM/dd/yyyy}"
HtmlEncode="false"/>

Apparently the value is HTML-encoded before the DataFormatString is
applied, which means the format string won't work.

Lee

[quoted text, click to view]
AcaBrian
12/1/2005 10:02:02 PM

Thanks Lee
Gridview formating is working great now.
Brian
AddThis Social Bookmark Button