DataFormatString in my Gridview not working in SharePoint

I have an ASP.NET GridView that I created on a page via SharePoint Designer 2007. For some reason it just doesn't want to work, why is this and how can I fix it?

Funny thing, it worked on a different SharePoint server but not the one I'm currently working on, so I know my code is fine, there must be something ell on the SharePoint server maybe?

My currency DataFormatStrings also doesn't want to work on my current SharePoint server.

My DataFormatString for Date field

<asp:BoundField DataField="c505_remdate" HeaderText="Remit. Advice Date" 
 SortExpression="c505_remdate" DataFormatString="{0:d/MM/yyyy}" />

      

+1


a source to share


2 answers


Does anything pop up in the log when trying to view your page? Are you just getting a blank page on load? Is it just a grid view that is missing? A little more detail can help identify the problem.

Data format strings can become erratic if HtmlEncode is set to true. See the first note in the Notes section:



system.web.ui.webcontrols.boundfield.dataformatstring

+2


a source


set the htmlencode = "False" attribute in the field and fix it. go figure



+1


a source







All Articles