I have a web application that I am working on(ASP.NET 2.0 & C#). In it, I have a gridview that gets data from an Oracle Database. Some of the data that I need to display
if you set your datasource programmatically (code behind), you can still have all your columns in the gridview (use asp:DataBoundColumn)
DataFormatString="{0:d}"
this code is for your aspx page, if you really want to stick your presentation logic in your code behind - you have 2 options:
You can apply a dataformatstring
in the gridview
column to only show the date.
To get it to work you must make sure that HTMLEncode
is set to false
.
More information
You can use DataFormatString="{0:d}" HtmlEncode="False"
do not forget to use the last section [htmlencode]
I hope this works ... this works for me !!!!
Arunendra