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

Forums / Developing with Sitefinity / Event module questions

Event module questions

15 posts, 1 answered
  1. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    20 Nov 2009
    Link to this post
    Is there a way to setup the control in the admin so that admins only have to choose a date (not a time)?
    Is there a way to set a default country in the admin?
    How do I make the Contact Website a real hyperlink?
    Is there a way to hide fields that the admin leaves blank on the public site?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    22 Nov 2009
    Link to this post
    Hi Devin,

    Is there a way to setup the control in the admin so that admins only have to choose a date (not a time)?


    You need to map external templates - EventsItemEdit and EventsItemNew and replace the default RadDateTimePicker controls with RadDatePicker control which displays only a date.

    Is there a way to set a default country in the admin?


    There is no built in option in the admin interface. You can modify the control that shows all countries. It is a standard DropDownList control. It is located in EventsItemEdit and EventsItemNew templates and it has ID="Country". You can set an item of this list as selected.

    How do I make the Contact Website a real hyperlink?
    Is there a way to hide fields that the admin leaves blank on the public site?

    Please take a look at this post. After you have made the suggested modifications you can set the following format for the WebSite( Contact Web) <a href='http://{0}'>{0}

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    23 Nov 2009
    Link to this post
    I've noticed that if you set a default value in web.config for country, it selects that value automatically when adding a new item:

    <add key="Events.Country" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="USA" /> 

    this is also true for the state menu, and even textbox values like city. this is on 3.7 sp1. hope this was helpful!
  4. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    23 Nov 2009
    Link to this post
    Hi Ivan,
    The first one worked like a charm and SelArom's input also gave me the desired results.  I read the post below but was unable to find the files you are referring to.  Are they the same in Sitefinity 3.7?

    Thanks,
    Devin
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    23 Nov 2009
    Link to this post
    Hi Devin,

    Maybe you have missed to take a look at this KB -  map external templates

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    23 Nov 2009
    Link to this post
    Hi Ivan,
    That helped a lot.  I'm seeing the format options now but it doesn't apear that they are saving.  Can you please advise?

    Thanks,
    Devin
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    24 Nov 2009
    Link to this post
    Hello Devin,

    Try to remove the control from your page then add it again. It is possible that something is cached. If the problem persists, let me know.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    24 Nov 2009
    Link to this post
    Hi Ivan,
    It's saving but I don't see any changes on the public site.  Has ~/Sitefinity/ControlTemplates/Events/Modes/ListPageDetail.ascx been removed from Sitefinity 3.7?  I am not able to find it in my control templates only ~/Sitefinity/Admin/ControlTemplates/Events/Modes/ListPageDetail.ascx.

    Thanks,
    Devin


  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    24 Nov 2009
    Link to this post
    Hi Devin,

    ListPageDetail template is available as external resources that you can download from your account downloads section. The template should be mapped through ControlsDesigner >> Advanced Tab >> SingleItemTemplatePath property or through the ControlDesigner. Let me know if the problem persists. Please be sure that the templates are mapped. You can also post the changes you made so I could try to figure out what is going wrong.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  10. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    27 Nov 2009
    Link to this post
    Hi Ivan,
    I found the control and I think it's mapped correctly now.  I'm seeing the values entered into Sitefinity the way I'm expecting but I'm not seeing the formatting that I added in the EventsViewControlDesigner.  This is my code in ~/Sitefinity/Admin/ControlTemplates/Events/Modes/ListPageDetail.ascx.

        <address id="Location" runat="server" class="sf_eventLocation"
            <asp:Literal ID="Street" runat="server" /><br /> 
            <asp:Literal ID="City" runat="server" /><br /> 
            <asp:Literal ID="State" runat="server" /><br /> 
            <asp:Literal ID="Country" runat="server" /><br /> 
        </address> 
     

    For example, I'm seeing something like:

    1234 main st
    Vancouver
    BC
    Canada

    and I want it to look like
    Street: 1234 main st
    City: Vancouver
    State: BC
    Country: Canada
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    27 Nov 2009
    Link to this post
    Hi Devin,

    Make sure that the template and designer looks as below:

    ListPageDetail.aspx:

    <%@ Control Language="C#" %>
    <%@ Register Assembly="Telerik.Cms.Engine" Namespace="Telerik.Cms.Engine.WebControls" TagPrefix="sfWeb" %>
    <%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Web.UI.SpamProtection" TagPrefix="sfWeb" %>
     
    <telerik:CssFileLink ID="CssFileLink1" EmbeddedFileName="Telerik.Events.Resources.ControlTemplates.Frontend.eventsCommonLayout.css" FileName="" Media="screen" runat="server" />
    <telerik:JsFileLink id="jsLink" runat="server" ScriptType="jQuery" />
     
    <div class="sf_singleEvent">
        <asp:HyperLink ID="backToList1" Text="All events" CssClass="sf_back" runat="server"></asp:HyperLink>
        <h2 class="sf_eventTitle">
            <asp:Literal ID="Title" runat="server" />
        </h2>
        <asp:Image ID="Thumbnail" runat="server" />
        <div class="sf_eventBasicInfo">
            <p class='sf_eventPriod'><asp:Literal ID="Event_Start" runat="server" Text="{0}" /></p>
            <p class='sf_eventPriod'><asp:Literal ID="Event_End" runat="server" Text="{0}" /></p>
            <p class='sf_eventPriod'><asp:Literal ID="Publication_Date" runat="server" Text="{0}" /></p>
        </div>
        
            <address id="Location" runat="server" class="sf_eventLocation">
               <asp:Literal ID="Street" runat="server" Text="{0}" /><br />
               <asp:Literal ID="City" runat="server" Text="{0}" /><br />
               <asp:Literal ID="State" runat="server" Text="{0}" /><br />
               <asp:Literal ID="Country" runat="server" Text="{0}" /><br />
            </address>
       <div class="sf_eventContent">
            <asp:Literal ID="content" runat="server" />
        </div
         
        <asp:Panel ID="mapPanel" runat="server" CssClass="sf_eventMap"></asp:Panel>
       <asp:PlaceHolder ID="plhWho" runat="server">   
            <address class="sf_eventContact">       
                 
                <asp:Literal ID="Contact_Name" runat="server" Text="{0}" /><br />
               Email: <asp:Literal ID="Contact_Email" runat="server" Text="<a href='mailto:{1}'>{0}</a>" /><br />
                Phone: <asp:Literal ID="Contact_Phone" runat="server" Text="{0}" /><br />
                Cell: <asp:Literal ID="Contact_Cell" runat="server" Text="{0}" /><br />
                Website: <asp:Literal ID="Contact_Web" runat="server" Text="<a href='http://{1}'>{0}</a>" /><br />
            </address>
        </asp:PlaceHolder>
         
        <p class="sf_eventCategory" runat="server" id="plhCategory">
            <asp:HyperLink ID="Category" runat="server" />
         </p>
         <p class="sf_eventTags" runat="server" id="plhTags">
             
            <asp:Repeater ID="Tags" runat="server">
                <ItemTemplate>
                    <asp:HyperLink ID="tagLink" runat="server" />
                </ItemTemplate>
            </asp:Repeater>
        </p>
         
         
        <asp:Repeater ID="Bookmarks" runat="server">
            <HeaderTemplate><ul class="sf_socialBookmarks"></HeaderTemplate>
            <ItemTemplate>
                <li>
                    <asp:HyperLink ID="BookmarkLink" runat="server">
                        <asp:Image ID="BookmarkImage" runat="server" />
                    </asp:HyperLink>
                </li>
            </ItemTemplate>
            <FooterTemplate></ul></FooterTemplate>
        </asp:Repeater>
        
    </div>
    <sfWeb:CommentsList ID="commentsList" runat="server" CssClass="sf_contentComments"></sfWeb:CommentsList>

    EventsViewControlDesigner.ascx - the change is made only for List and Page mode.

    <%@ Control Language="C#" %>
    <%@ Register Assembly="Telerik.Cms.Engine" Namespace="Telerik.Cms.Engine.WebControls.Design" TagPrefix="sfDesign" %>
    <%@ Register Assembly="Telerik.Cms.Engine" Namespace="Telerik.Cms.Engine.WebControls.Design.Settings" TagPrefix="sfDesignSettings" %>
    <%@ Register Assembly="Telerik.Cms.Engine" Namespace="Telerik.Cms.Engine.WebControls.Design.Selectors" TagPrefix="sfDesignSelectors" %>
    <%@ Register Assembly="Telerik.Events" Namespace="Telerik.Events.WebControls.Design.Selectors" TagPrefix="sfDesignEventsSelectors" %>
     
    <div class="ctrlProps">
        <div class="ctrlContent slidingWizard">
            <div id="slidingWizardSteps">
                <!-- wizard panel 1 : timing settings, parent ids, categories, links -->
                <div id="Panel1">
                    <h3>
                        <asp:Literal runat="server" Text="<%$Resources:WhichEventsToDisplay %>" /></h3>
                     
                    <div class="publicationFilter">
                        <sfDesignEventsSelectors:TimeSelector ID="TimeSelector" runat="server" PastItemsText="Past events" CurrentItemsText="Current items" FutureItemsText="Future items" PastItemsCheckedByDefault="true" CurrentItemsCheckedByDefault="true" FutureItemsCheckedByDefault="true" />
                    </div>
                     
                    <div class="extLinks">
                       <p>
                            <asp:Label ID="lblNotCreatedEventsYet" runat="server" Text='<%$Resources:NotCreatedEventsYet %>'></asp:Label><br />
                            <asp:HyperLink ID="lnkCreateAnEvent" CssClass="newWind" runat="server" Text='<%$Resources:CreateAnEvent %>'></asp:HyperLink>
                       </p>
                    </div>
                </div>
                <!-- end wizard panel 1 -->
                 
                <!-- wizard panel 2 : ContentView mode choice -->
                <div id="Panel2">
                    <h3>
                        <asp:Literal runat="server" Text="<%$Resources:HowToDisplayEvents %>" /></h3>
                    <div id="itemsDisplayOptions" class="contentViewDisplayOptions">
                    <ul>
                    <sfDesign:PresentationModes ID="presentationModes" runat="server">
                        <sfDesign:PresentationMode ID="listPageMode" runat="server"
                                                   ModeTitle="List & page"
                                                   ModeSettingsId="ModesSettings1"
                                                   MasterTemplateName="Telerik.Events.Resources.ControlTemplates.Frontend.Modes.ListPageMaster.ascx"
                                                   DetailTemplateName="Telerik.Events.Resources.ControlTemplates.Frontend.Modes.ListPageDetail.ascx"
                                                   CssClass="pageListMode"
                                                   SelectedCssClass="selectedOption pageListMode"
                                                   >
                            <Template>
                                    <asp:RadioButton ID="listPageRadio" runat="server" />
                                    <p>A list of event titles, dates and summaries (optional). The full event info is opened in a separate page.</p>
                                 
                            </Template>
                        </sfDesign:PresentationMode>
                        <sfDesign:PresentationMode ID="ExpandableList" runat="server"
                                                   ModeTitle="Expandable list"
                                                   ModeSettingsId="ModesSettings2"
                                                   MasterTemplateName="Telerik.Events.Resources.ControlTemplates.Frontend.Modes.ExpandableListMaster.ascx"
                                                   CssClass="expandableList"
                                                   SelectedCssClass="selectedOption expandableList"
                                                   >
                            <Template>
                                    <asp:RadioButton ID="ExpandableListRadio" runat="server" />
                                    <p>A list of event titles and dates. The full info is expanded in the same list when a title is clicked.</p>
                            </Template>
                        </sfDesign:PresentationMode>
                        <sfDesign:PresentationMode ID="allInAListMode" runat="server"
                                                   ModeTitle="Expanded list"
                                                   ModeSettingsId="ModesSettings3"
                                                   MasterTemplateName="Telerik.Events.Resources.ControlTemplates.Frontend.Modes.AllPostsListMaster.ascx"
                                                   CssClass="allInListMode"
                                                   SelectedCssClass="selectedOption allInListMode">
                            <Template>
                                    <asp:RadioButton ID="allPostsInAListRadio" runat="server" />
                                    <p>All events with their titles and the full info are in a common page.</p>
                            </Template>
                        </sfDesign:PresentationMode>
                    </sfDesign:PresentationModes>
                    </ul>
                    </div>
                </div>
                <!-- end wizard panel 2 -->
                 
                <!-- wizard sliding navigation -->
                <ol class="slidingWizardNavigation">
                    <li class="previous"><a href="#" onclick="setMovement('next'); "><strong>Settings</strong>
                        (optional)</a></li>
                    <li class="next"><a href="#" onclick="setMovement('prev'); ">Back</a></li>
                </ol>
                <!-- end wizard sliding navigation -->
                 
                <!-- wizard panel 3 : optional settings for selected mode -->
                <div id="Panel3">
                    <h3>Event settings</h3>
                    <div id="optionalSelectedMode">
                    <sfDesign:PresentationModeSettings ID="ModesSettings1" runat="server">
                        <DetailHeaderTemplate>
                            <div class="selectedModeShortDescription">
                                 <h3>Selected mode</h3>
                                <h4 class="selectedTitlePageList">List & page</h4>
                                <p>A list of event titles, dates and summaries (optional). The full event info is opened in a separate page.</p>
                            </div>
                            <sfDesignSettings:PagingSetting id="pagingSetting" AllowListLimitSetting="true" DefaultListLimit="100" AllowPagingSetting="true" DefaultPageCount="10" LimitList="false" runat="server"></sfDesignSettings:PagingSetting>
                             
                            <h4>In the event page, display:</h4>
                            <ul>
                        </DetailHeaderTemplate>
                        <DetailSettings>
                            <sfDesignSettings:TextSetting ID="setting1"
                                                  TargetID="fullContent1"
                                                  SettingTitle="Title"
                                                  AllowLabelSetting="False"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="False"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                            <sfDesignSettings:TextSetting ID="TextSetting1"
                                                  TargetID="Event_Start"
                                                  SettingTitle="Start date"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="True"
                                                  FormatType="DateTime"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                           <sfDesignSettings:TextSetting ID="TextSetting8"
                                                  TargetID="Event_End"
                                                  SettingTitle="End date"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="True"
                                                  FormatType="DateTime"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                            <sfDesignSettings:TextSetting ID="TextSetting10"
                                                  TargetID="Publication_Date"
                                                  SettingTitle="Publication date"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="True"
                                                  FormatType="DateTime"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                            <sfDesignSettings:TextSetting ID="TextSetting5"
                                                  TargetID="content"
                                                  SettingTitle="Event description"
                                                  AllowLabelSetting="False"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="False"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                                                   
                        <sfDesignSettings:TextSetting ID="TextSetting9"
                            TargetID="Street" 
                            SettingTitle="Location street" 
                            AllowLabelSetting="True" 
                            AllowFormatSetting="True"
                            AllowVisibilitySetting="True"
                            TargetVisibleByDefault="True">
                            </sfDesignSettings:TextSetting
                        <sfDesignSettings:TextSetting ID="TextSetting36"
                            TargetID="City" 
                            SettingTitle="Location city" 
                            AllowLabelSetting="False" 
                            AllowFormatSetting="True"
                            FormatType="String"
                            AllowVisibilitySetting="True"
                            TargetVisibleByDefault="True">
                            </sfDesignSettings:TextSetting
                        <sfDesignSettings:TextSetting ID="TextSetting37"
                            TargetID="State" 
                            AllowLabelSetting="False" 
                            AllowFormatSetting="True"
                            FormatType="String"
                            AllowVisibilitySetting="True"
                            TargetVisibleByDefault="True">
                            </sfDesignSettings:TextSetting>
                        <sfDesignSettings:TextSetting ID="TextSetting38"
                                TargetID="Country" 
                            SettingTitle="Location country" 
                            AllowLabelSetting="False" 
                            AllowFormatSetting="True"
                            FormatType="String"
                            AllowVisibilitySetting="True"
                            TargetVisibleByDefault="True">
                            </sfDesignSettings:TextSetting> 
                                                   
                                                   
                                                  
                            <sfDesignSettings:TextSetting ID="TextSetting11"
                                                  TargetID="plhWho"
                                                  SettingTitle="Contact person details"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                          <sfDesignSettings:TextSetting ID="TextSetting12"
                                                  TargetID="mapPanel"
                                                  SettingTitle="Geographic map (to set details, use Advanced section above)"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="False">
                                                  </sfDesignSettings:TextSetting>                               
                          <sfDesignSettings:TextSetting ID="TextSetting3"
                                                  TargetID="plhTags"
                                                  SettingTitle="Tags"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                          <sfDesignSettings:TextSetting ID="TextSetting4"
                                                  TargetID="plhCategory"
                                                  SettingTitle="Category"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>  
                            <sfDesignSettings:TextSetting ID="TextSetting35"
                                                  TargetID="Bookmarks"
                                                  SettingTitle="Social bookmarks (del.icio.us, digg, reddit)"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>                     
                        </DetailSettings>
                        <DetailFooterTemplate>
                            </ul>
                        </DetailFooterTemplate>
                        <MasterHeaderTemplate>
                            <h4>For every event in the list page, display:</h4>
                            <ul>
                        </MasterHeaderTemplate>
                        <MasterSettings>
                            <sfDesignSettings:TextSetting ID="TextSetting6"
                                                  TargetID="fullContent1"
                                                  SettingTitle="Title, linking to the post page"
                                                  AllowLabelSetting="False"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="False"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                             <sfDesignSettings:TextSetting ID="TextSetting2"
                                                  TargetID="Event_Start"
                                                  SettingTitle="Start date"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="True"
                                                  FormatType="DateTime"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                           <sfDesignSettings:TextSetting ID="TextSetting25"
                                                  TargetID="Event_End"
                                                  SettingTitle="End date"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="True"
                                                  FormatType="DateTime"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="False">
                                                  </sfDesignSettings:TextSetting>
                          <sfDesignSettings:ContentSetting id="ContentSetting1"
                                                  TargetID="content">
                                                  </sfDesignSettings:ContentSetting>   
                        <sfDesignSettings:TextSetting ID="TextSetting7"
                                                  TargetID="Location"
                                                  SettingTitle="Event location"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  FormatType="String"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>                    
                          <sfDesignSettings:TextSetting ID="TextSetting30"
                                                  TargetID="fullContent2"
                                                  SettingTitle="Link 'More information'"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="True"
                                                  FormatType="String"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="False">
                                                  </sfDesignSettings:TextSetting>                  
                        </MasterSettings>
                        <MasterFooterTemplate>
                            </ul>
                            <sfDesignSettings:BehaviorSetting id="behaviorSetting" runat="server"></sfDesignSettings:BehaviorSetting>
                        </MasterFooterTemplate>
                    </sfDesign:PresentationModeSettings>
                     
                    <sfDesign:PresentationModeSettings ID="ModesSettings2" runat="server">
                        <MasterHeaderTemplate>
                            <div class="selectedModeShortDescription">
                                 <h3>Selected mode</h3>
                                <h4 class="selectedTitleExpandableList">Expandable list</h4>
                               <p>A list of event titles and dates. The full info is expanded in the same list when a title is clicked.</p>
                            </div>
                             
                            <sfDesignSettings:PagingSetting id="pagingSetting1" AllowListLimitSetting="true" DefaultListLimit="100" AllowPagingSetting="true" DefaultPageCount="20" LimitList="false" runat="server"></sfDesignSettings:PagingSetting>
                            <h4>For every item, display:</h4>
                            <ul>
                        </MasterHeaderTemplate>
                        <MasterSettings>
                            <sfDesignSettings:TextSetting ID="TextSetting13"
                                                  TargetID="Title"
                                                  SettingTitle="Title"
                                                  AllowLabelSetting="False"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="False"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                            <sfDesignSettings:TextSetting ID="TextSetting14"
                                                  TargetID="Event_Start"
                                                  SettingTitle="Start date"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="True"
                                                  FormatType="DateTime"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                           <sfDesignSettings:TextSetting ID="TextSetting15"
                                                  TargetID="Event_End"
                                                  SettingTitle="End date"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="True"
                                                  FormatType="DateTime"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                            <sfDesignSettings:TextSetting ID="TextSetting16"
                                                  TargetID="Publication_Date"
                                                  SettingTitle="Publication date"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="True"
                                                  FormatType="DateTime"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="False">
                                                  <Template>
                                                  <li>
                                                        <h4>In the expandable area, display:</h4>
                                                  </li>
                                                  <li>
                                                        <asp:CheckBox ID="visibilityCheckBox" runat="server" />
     
                                                        <asp:LinkButton ID="showOptionsButton" runat="server"></asp:LinkButton>
     
                                                        <div id="optionsPanel" runat="server" style="display:none;" class="textSettingsOptions">
                                                             
                                                            <asp:Panel ID="labelSettingsPanel" runat="server">
                                                                <asp:Label ID="lbl1" runat="server" Text="Label" AssociatedControlID="fieldLabel"></asp:Label>
                                                                <asp:TextBox ID="fieldLabel" runat="server"></asp:TextBox>
                                                                <p class="example">Example</p>
                                                            </asp:Panel>
                                                             
                                                            <asp:Panel ID="dateTimeFormatPanel" runat="server">
                                                                <asp:Label ID="lbl3" runat="server" Text="Date format" AssociatedControlID="dateTimeFieldFormat"></asp:Label>
                                                                <asp:DropDownList ID="dateTimeFieldFormat" runat="server"></asp:DropDownList>
                                                                <p class="example">Example</p>
                                                            </asp:Panel>
                                                             
                                                            <asp:Panel ID="numberFormatPanel" runat="server">
                                                                <asp:Label ID="lbl4" runat="server" Text="Number format" AssociatedControlID="numberFieldFormat"></asp:Label>
                                                                <asp:DropDownList ID="numberFieldFormat" runat="server"></asp:DropDownList>
                                                                <p class="example">Example</p>
                                                            </asp:Panel>
                                                             
                                                            <asp:Panel ID="stringFormatPanel" runat="server">
                                                                <asp:Label ID="lbl5" runat="server" Text="String format" AssociatedControlID="stringFieldFormat"></asp:Label>
                                                                <asp:TextBox ID="stringFieldFormat" runat="server"></asp:TextBox>
                                                                <p class="example">
                                                                    e.g. "There are {0} items in stock." - "{0}" will be replaced with actual value
                                                                </p>
                                                            </asp:Panel>
                                                             
                                                            <asp:LinkButton ID="hideOptionsButton" CssClass="collapseTextSettings" runat="server" Text="Close"></asp:LinkButton>
                                                        </div>
                                                    </li>
                                                   
                                                  </Template>
                                                  </sfDesignSettings:TextSetting>
                            <sfDesignSettings:TextSetting ID="TextSetting17"
                                                  TargetID="content"
                                                  SettingTitle="Event description"
                                                  AllowLabelSetting="False"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="False"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                        <sfDesignSettings:TextSetting ID="TextSetting18"
                                                  TargetID="plhWhere"
                                                  SettingTitle="Event location"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  FormatType="String"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                            <sfDesignSettings:TextSetting ID="TextSetting19"
                                                  TargetID="ContactPersonDetails"
                                                  SettingTitle="Contact person details"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                          <sfDesignSettings:TextSetting ID="TextSetting20"
                                                  TargetID="mapPanel"
                                                  SettingTitle="Geographic map (to set details, use Advanced section above)"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>                               
                          <sfDesignSettings:TextSetting ID="TextSetting21"
                                                  TargetID="plhTags"
                                                  SettingTitle="Tags"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="False">
                                                  </sfDesignSettings:TextSetting>
                          <sfDesignSettings:TextSetting ID="TextSetting34"
                                                  TargetID="plhCategory"
                                                  SettingTitle="Category"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="False">
                                                  </sfDesignSettings:TextSetting>      
                        </MasterSettings>
                        <MasterFooterTemplate>
                            </ul>
                        </MasterFooterTemplate>
                    </sfDesign:PresentationModeSettings>
                     
                    <sfDesign:PresentationModeSettings ID="ModesSettings3" runat="server">
                        <MasterHeaderTemplate>
                            <div class="selectedModeShortDescription">
                                 <h3>Selected mode</h3>
                                <h4 class="selectedTitleAllInAList">Expanded list</h4>
                                <p>All events with their titles and the full info are in a common page.</p>
                            </div>
                            <sfDesignSettings:PagingSetting id="pagingSetting2" AllowListLimitSetting="true" AllowPagingSetting="true" DefaultListLimit="100" DefaultPageCount="20" LimitList="false" runat="server"></sfDesignSettings:PagingSetting>
                            <h4>For every event, display:</h4>
                            <ul>
                        </MasterHeaderTemplate>
                        <MasterSettings>
                            <sfDesignSettings:TextSetting ID="TextSetting22"
                                                  TargetID="Title"
                                                  SettingTitle="Title"
                                                  AllowLabelSetting="False"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="False"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                            <sfDesignSettings:TextSetting ID="TextSetting23"
                                                  TargetID="Event_Start"
                                                  SettingTitle="Start date"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="True"
                                                  FormatType="DateTime"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                           <sfDesignSettings:TextSetting ID="TextSetting24"
                                                  TargetID="Event_End"
                                                  SettingTitle="End date"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="True"
                                                  FormatType="DateTime"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                            <sfDesignSettings:TextSetting ID="TextSetting26"
                                                  TargetID="Publication_Date"
                                                  SettingTitle="Publication date"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="True"
                                                  FormatType="DateTime"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="False">
                                                  </sfDesignSettings:TextSetting>
                            <sfDesignSettings:TextSetting ID="TextSetting27"
                                                  TargetID="content"
                                                  SettingTitle="Event description"
                                                  AllowLabelSetting="False"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="False"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                        <sfDesignSettings:TextSetting ID="TextSetting28"
                                                  TargetID="plhWhere"
                                                  SettingTitle="Event location"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  FormatType="String"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                            <sfDesignSettings:TextSetting ID="TextSetting29"
                                                  TargetID="ContactPersonDetails"
                                                  SettingTitle="Contact person details"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>
                          <sfDesignSettings:TextSetting ID="TextSetting31"
                                                  TargetID="mapPanel"
                                                  SettingTitle="Geographic map (to set details, use Advanced section above)"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="True">
                                                  </sfDesignSettings:TextSetting>                               
                          <sfDesignSettings:TextSetting ID="TextSetting32"
                                                  TargetID="plhTags"
                                                  SettingTitle="Tags"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="False">
                                                  </sfDesignSettings:TextSetting>
                          <sfDesignSettings:TextSetting ID="TextSetting33"
                                                  TargetID="plhCategory"
                                                  SettingTitle="Category"
                                                  AllowLabelSetting="True"
                                                  AllowFormatSetting="False"
                                                  AllowVisibilitySetting="True"
                                                  TargetVisibleByDefault="False">
                                                  </sfDesignSettings:TextSetting>                    
                        </MasterSettings>
                        <MasterFooterTemplate>
                            </ul>
                        </MasterFooterTemplate>
                    </sfDesign:PresentationModeSettings>
                    </div>
                </div>
                <!-- end wizard panel 3 -->
                 
            </div>
        </div>
    </div>
     
    <!-- DO NOT MODIFY BELOW THIS LINE -->
    <asp:HiddenField ID="selectedModeIdField" runat="server" />
    <asp:HiddenField ID="selectedModeClientIdField" runat="server" />
    <asp:HiddenField ID="designerIsDirty" runat="server" />
     
    <script type="text/javascript">
     
    var eventsOptionsItems = document.getElementById("itemsDisplayOptions").getElementsByTagName("LI");
     
    if( eventsOptionsItems ) {
     
     
        for( var i = 0; i < eventsOptionsItems.length; i++) {
     
            eventsOptionsItems[i].onclick = function () {
                this.getElementsByTagName("input")[0].click();
            }
     
        }
     
     
    }
     
     
    function manageAllPageSettingsInit () {
        var temp = document.getElementById("Panel3").getElementsByTagName("div");
        for(var i = 0; i < temp.length; i++)
            if(/displayModePagingSetttings/.test(temp[i].className)){
                var tempInputs = temp[i].getElementsByTagName("input");
                managePageSettingsInit(tempInputs[0],tempInputs[1]);
            }
    }
    function managePageSettingsInit (chkbox, displayAmount) {
     
        managePageSettings (chkbox,displayAmount);
        chkbox.onclick = function () {
            managePageSettings (chkbox,displayAmount);
        }   
     
    }
    function managePageSettings (chkboxCondition, displayAmount) {
        if(chkboxCondition.checked == true) {
            displayAmount.disabled = "";
            displayAmount.className = "number";
        } else {
            displayAmount.disabled = "disabled";
            displayAmount.className += " disabled";
        }   
    }
     
     
    manageAllPageSettingsInit();
     
     
    </script>

    In the control designer add the following formatting SomeValue : {0} ( Street : {0})

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  12. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    27 Nov 2009
    Link to this post
    Hi Ivan,
    Thanks very much for all your help on this issue.  I compared the code in the above post and I'm still not getting the results I'm after.  Is there a way that I can override the databinding of the Single Item Events viewer?

    Thanks,
    Devin
  13. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    29 Nov 2009
    Link to this post
    Hello Devin,

    I used the same code without problems. Also the solution was working great for the other community members which followed the same steps in the forum post I redirected you.

    Is there a way that I can override the databinding of the Single Item Events viewer?
     
    You can override SetItemMetadata method to access the content item and then all metafields.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  14. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    30 Nov 2009
    Link to this post
    Hi Ivan,
    The code works.  I guess I didn't read mine closely enough because I was putting the Location Custom fields in <MasterSettings> instead of <DetailSettings> :P  Thanks for all your help!

    -Devin
  15. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    30 Nov 2009
    Link to this post
    Hi Devin,

    Thanks for getting back to me and it's great to hear that everything is working fine now.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
15 posts, 1 answered