GridView and BoundField DataFormat Strings with Dates

Posted by: Rick Strahls WebLog, on 29 Oct 2006 | View original | NEW Bookmarked: 0 time(s)

More in the line of stupid pet tricks: I keep running into this particular issue from time to time and promptly forget the solution, so Im blogging it again for my own sanity.   If you use GridView and you have a BoundField column in you might run code like this to format a date string:   <asp:BoundField  DataField="OrderDate" DataFormatString="{0:d}" HeaderText="Date"                  meta:resourcekey="BoundField">    ...

Advertisement
Category: GridView | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 3361 | Hits: 309

Similar Posts

  • Simple tips: Set Focus to TextBox in GridView (edit mode) more
  • Changes to make the code in the Add a new row ro the GridView ... post work. more
  • Access GridView BoundFields with "field name" more
  • Mark a GridView row, and move it with the up and down key more
  • How to simply modify a GridView more
  • 14 VB Gridview Samples by Hannes more
  • More Tutorials on Working with the DataList... and More Tutorials in the Pipeline! more
  • Multiple child views with RadGridView for WinForms more
  • WPF Release History : Q1 2009 SP2 (version 2009.1.526) more
  • Silverlight Release History : Q1 2009 SP2 (version 2009.1.526) more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD