avatar

My life as journaled

Because I'm boring like that


Previous Entry Share Next Entry
avatar

ASP.NET dateformat in a gridview (the DataFormatString={0:M-dd-yyyy} Problem)

Glad to find out I'm not doing this wrong - if you simply apply a dateformat to a bound field in a gridview, you won't get the result you expect. Easy way to fix? Set "HtmlEncode" to false. The more complex solution is to make it a template column and set the value programmatically.

I got the information from this blog entry - How To Set a Date Format In GridView Using ASP.NET 2.0
Tags: ,

  • 1
mewilliamson November 27th, 2007
oddly useful, as i am working on .net gridviews at the moment - although haven't had that specific problem yet

anitra November 27th, 2007
Yeah, I couldn't tell if I was doing something wrong, so it took me a while to find the solution. I figured I'd put it here for future reference, and to make it easier for other people to find :)

mewilliamson November 27th, 2007
indeed

... on a completely different topic - where did you get the user pic from?

anitra November 27th, 2007
Um... I've had this one for a couple years. Somebody had linked to a face-creator thing. I couldn't find it again now if my life depended on it.

Sheesh. I can tell you where every single one of my other icons comes from, but not the face...

  • 1
?

Log in

No account? Create an account