.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old May 8th, 2008, 06:04 AM
prcAdap's Avatar
prcAdap prcAdap is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts) Click here for more information
 
Join Date: Mar 2005
Location: Tír na nÓg
Posts: 1,147 prcAdap User rank is First Lieutenant (10000 - 20000 Reputation Level)prcAdap User rank is First Lieutenant (10000 - 20000 Reputation Level)prcAdap User rank is First Lieutenant (10000 - 20000 Reputation Level)prcAdap User rank is First Lieutenant (10000 - 20000 Reputation Level)prcAdap User rank is First Lieutenant (10000 - 20000 Reputation Level)prcAdap User rank is First Lieutenant (10000 - 20000 Reputation Level)prcAdap User rank is First Lieutenant (10000 - 20000 Reputation Level)prcAdap User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 7 h 50 sec
Reputation Power: 172
Bind DateTime in GridView

Hi all,

I've got a bit of code that has always worked in the past.
I call it a bit of code, but it's just a bind (tried eval, but no luck).
Here is the aspx page:
Code:
<asp:GridView ID="gvMaps" runat="server"
              DataSourceID="gvMapsDS"
              AutoGenerateColumns="False" Width="100%">
<Columns>
    
    <asp:TemplateField HeaderText="ID" SortExpression="Id">
        <ItemTemplate>
            <asp:Label ID="lblId" runat="server" Text='<%# Bind( "Id" ) %>' />
        </ItemTemplate>
    </asp:TemplateField>
    
    <asp:TemplateField HeaderText="Request Date" SortExpression="RequestDate">
        <ItemTemplate>
            <asp:Label ID="lblRequestDate" runat="server" Text='<%# Bind"RequestDate", "{0:dd/MM/yyyy}" ) %>' />
        </ItemTemplate>
    </asp:TemplateField>
    
    <asp:TemplateField HeaderText="Map Created" SortExpression="MapCreated">
        <ItemTemplate>
            <asp:Label ID="lblMapCreated" runat="server" Text='<%# Bind( "MapCreated" ) %>' />
        </ItemTemplate>
    </asp:TemplateField>
    
    <asp:TemplateField HeaderText="Document ID" SortExpression="DocumentID">
        <ItemTemplate>
            <asp:Label ID="lblDocumentID" runat="server" Text='<%# Bind( "DocumentID" ) %>' />
        </ItemTemplate>
    </asp:TemplateField>
    
</Columns>           

</asp:GridView>

<asp:ObjectDataSource ID="gvMapsDS" runat="server" 
                      TypeName="Processes.WSManager"
                      DataObjectTypeName="Objects.GisFieldRequest"
                      SelectMethod="GetMapRequestsByUserId">
</asp:ObjectDataSource>

The bind on the RequestDate column should be in the format dd/MM/yyyy, but I'm getting the hours, minutes and seconds also, but no ticks.
Any idea why this is ignoring my bind instruction?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > Bind DateTime in GridView


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway