BoundField DataFormatString attribute not being applied

This has bitten me more than once I'm afraid. Figured I'd post this and link to Raj Kaimal's post...

BoundField.DataFormatString Property via MSDN

When the HtmlEncode property is true, the value of the field is HTML encoded to its string representation before the formatting string is applied. For some objects, such as dates, you might want to control how the object is displayed with a formatting string. In those cases, you must set the HtmlEncode property to false.
This is new to VS.NET 2005...

Hope this post helps me remember to set the HtmlEncode attribute to false next time ;-)

No comments: