More in this section

Forums / Developing with Sitefinity / EventsView Details Mode

EventsView Details Mode

4 posts, 0 answered
  1. LBrinley
    LBrinley avatar
    59 posts
    Registered:
    29 Dec 2005
    23 Dec 2008
    Link to this post
    Why does the Details Mode of the EventsView work differently than the NewsView?

    Here's the basis of my question.  I've separated the 'Master mode' (Default.aspx) and 'Details mode' (Details.aspx) pages in two different sections of my site -- one section using the NewsView and the other the EventsView control.  If I navigate directly to an ".../Details/[posted_date]/[Event_Title].aspx" page the EventsView displays a LIST of events unless I add the ?Events=EventItem querystring.  If I navigate to an analogous page in the news section, i.e., ".../Details/[posted_date]/News_Title].aspx," I get the expected details view WITHOUT any querystring.

    In short, can I get rid of the ?Events=EventItem querystring in the EventsView Details mode somehow?
  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    23 Dec 2008
    Link to this post
    I had this same exact problem and was informed that it is a known issue that will be resolved in the next release. It is a result of the eventsview not saving the ContentItemKeyPersistance to "none" (currently it defaults to querystring).

    the workaround given was to inherit from the eventsview and use this new module instead:

    using System;    
    using System.Data;    
    using System.Configuration;    
    using System.Web;    
    using System.Web.Security;    
    using System.Web.UI;    
    using System.Web.UI.HtmlControls;    
    using System.Web.UI.WebControls;    
    using System.Web.UI.WebControls.WebParts;    
    //    
    using Telerik.Events.WebControls;    
        
    /// <summary>    
    /// Summary description for EventsViewFix    
    /// </summary>    
    public class EventsViewFix : EventsView    
    {    
        public override Telerik.Cms.Engine.WebControls.ContentBasic.ItemKeyPersistanceMode ContentItemKeyPersistance    
        {    
            get    
            {    
                return base.ContentItemKeyPersistance;    
            }    
            set    
            {    
                base.ContentItemKeyPersistance = ItemKeyPersistanceMode.None;    
            }    
        }    
    }    
     


    then add this in web.config

    <toolboxControls>    
      ...    
      <add name="EventsViewFixed" section="Most popular" type="EventsViewFix, App_Code" />    
      ...     
    </toolboxControls>    
     


    finally use this eventsview control in place of the builtin one

    hope this was helpful!
  3. LBrinley
    LBrinley avatar
    59 posts
    Registered:
    29 Dec 2005
    23 Dec 2008
    Link to this post
    SelArom,

    Thank you for your excellently stated solution to my problem. Read your post; copied/pasted your thoughtfully provided code; and fixed my problem.  Makes me regret having blown so much time trying to fix it without having posted to these forums.

    Thanks Again!
  4. Parvan
    Parvan avatar
    151 posts
    Registered:
    24 Sep 2012
    29 Dec 2008
    Link to this post
    Hello Larry, Josh,

    Thank you for your help, Josh.

    The problem with EventsView control will be fixed in next version of Sitefinity.

    Best Regards,
    Parvan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered