ragi0017,
That's exactly my dilemma, the columns are bound after the application executes. There are no bound fields in my GridView, this is what my HTML/ASP code looks like:
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
Do you have syntax examples of how to use the DataFormatString in my code?
Thanks
MRotor :-)
Main Topics
Browse All Topics





by: ragi0017Posted on 2009-06-15 at 21:01:05ID: 24634789
you will have to use dataformatstring for the bound columns
DataFormatString examples:
{0:dd MMMM yyyy} - gives 24 February 2006
{0:MMM dd} - gives Feb 24 (substitue MMM with MMMM for the full month name instead of abbreviation)
{0:dd/MM/yy} - gives 24/02/06
{0:dd/MM/yyyy} - gives 24/02/2006
similarly you can do for the time part too
also set HtmlEncode="False" to the BoundField.