+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Event_Event date can not

Event_Event date can not

2 posts, 0 answered
  1. Stephen
    Stephen avatar
    70 posts
    Registered:
    09 Jun 2009
    15 Sep 2010
    Link to this post
    I am trying to use an customizable ascx control to display a list of events, but the event end date (Event_End) could not be displayed. All other meta fields (Event_Start, Contact_Name, Street...) can be displayed correctly. Can you help? Thanks a lot.

    <%@ Control Language="C#" %>
    <%@ Register Assembly="Telerik.Cms.Engine" Namespace="Telerik.Cms.Engine.WebControls" TagPrefix="sfWeb" %>
     
    <telerik:CssFileLink ID="CssFileLink1" EmbeddedFileName="Telerik.Events.Resources.ControlTemplates.Frontend.eventsCommonLayout.css" FileName="" Media="screen" runat="server" />
     
    <asp:HyperLink ID="backLink" runat="server" Text="<%$Resources:GoBack %>" />
    <asp:Repeater ID="repeater" runat="server">
     <HeaderTemplate>
        <ol class="sf_eventsList">
        </HeaderTemplate>
        <ItemTemplate>
            <li>
                <h2 class="sf_eventTitle">
                    <asp:HyperLink ID="fullContent1" runat="server">
                        <asp:Literal ID="Title" runat="server" />
                    </asp:HyperLink>
                </h2>
                <p class="sf_eventPriod">
                    <telerik:DateTimeLiteral runat="server" ID="Event_Start" DateFormatString="D"></telerik:DateTimeLiteral> -
                </p>
                <asp:Literal ID="Event_End" runat="server" />
                <asp:Literal ID="Street" runat="server" />
                <p class="sf_contentCity">
                    <asp:Literal ID="City" runat="server" />
                </p>
                <asp:Panel id="pnlPostContent" runat="server" CssClass="sf_eventContent">
                    <asp:Literal ID="content" runat="server" />
                </asp:Panel>
            </li>
        </ItemTemplate>
        <FooterTemplate>
            </ol>
        </FooterTemplate>
    </asp:Repeater>
    <telerik:Pager ID="pager1" runat="server">
        <LayoutTemplate>
            <asp:Repeater ID="PageRepeater" runat="server">
                <HeaderTemplate>
                    <ol class="sf_pager">  
                    <li><asp:LinkButton ID="PreviousPage" runat="server" Text="<%$Resources:PreviousPage %>"></asp:LinkButton></li>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <asp:LinkButton ID="SingleItem" runat="server" />
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    <li><asp:LinkButton ID="NextPage" runat="server" Text="<%$Resources:NextPage %>"></asp:LinkButton></li>
                    </ol>
                </FooterTemplate>
            </asp:Repeater>
        </LayoutTemplate>
    </telerik:Pager>
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Sep 2010
    Link to this post
    Hi Stephen,

    Here is  the template that you have to use

    Mapped
    <asp:HyperLink ID="backLink" runat="server" Text="GoBack" />
    <asp:Repeater ID="repeater" runat="server">
     <HeaderTemplate>
        <ol class="sf_eventsList">
        </HeaderTemplate>
        <ItemTemplate>
            <li>
                <h2 class="sf_eventTitle">
                    <asp:HyperLink ID="fullContent1" runat="server">
                        <asp:Literal ID="Title" runat="server" />
                    </asp:HyperLink>
                </h2>
                <p class="sf_eventPriod">
                    <telerik:DateTimeLiteral runat="server" ID="Event_Start" DateFormatString="D"></telerik:DateTimeLiteral> -
                </p>
               <strong> End:</strong> <asp:Literal ID="Event_End" runat="server" />
                <asp:Literal ID="Street" runat="server" />
                <p class="sf_contentCity">
                    <asp:Literal ID="City" runat="server" />
                </p>
                <asp:Panel id="pnlPostContent" runat="server" CssClass="sf_eventContent">
                    <asp:Literal ID="content" runat="server" />
                </asp:Panel>
            </li>
        </ItemTemplate>
        <FooterTemplate>
            </ol>
        </FooterTemplate>
    </asp:Repeater>
     
    <telerik:Pager ID="pager1" runat="server">
        <LayoutTemplate>
             <asp:Repeater ID="PageRepeaterLinkButton" runat="server">
                <HeaderTemplate>
                    <ol class="sf_pager">
                    <li><asp:LinkButton ID="PreviousPage" runat="server" Text="PreviousPage"></asp:LinkButton></li>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <asp:LinkButton ID="SingleItem" runat="server" />
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    <li><asp:LinkButton ID="NextPage" runat="server" Text="NextPage"></asp:LinkButton></li>
                    </ol>
                </FooterTemplate>
            </asp:Repeater>
            <asp:Repeater ID="PageRepeaterHyperLink" runat="server">
                <HeaderTemplate>
                    <ol class="sf_pager">
                    <li><asp:HyperLink ID="PreviousPage" runat="server" Text="PreviousPage"></asp:HyperLink></li>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <asp:HyperLink ID="SingleItem" runat="server" />
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    <li><asp:HyperLink ID="NextPage" runat="server" Text="NextPage"></asp:HyperLink></li>
                    </ol>
                </FooterTemplate>
            </asp:Repeater>
            
        </LayoutTemplate>
    </telerik:Pager>

    Make sure that you have checked "Event_End" text mapping from the control designer.


    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered