RadScheduler and Events

2 posts, 0 answers
  1. Scott Bradley
    Scott Bradley avatar
    5 posts
    Member since:
    Jan 2010

    Posted 05 May 2011 Link to this post

    For layout purposes I am trying to use the RadScheduler control in Sitefinity 4.0.  I want to modify the template so that when it's clicked it goes to the event's home page.  It seems that the event page in the events widget needs the DateCreated value.  How can I cast an appointment object as an event object?  I'm trying to do something to the effect of this:

    Container doesn't exist.  Is this even possible?  Or the dataitem doesn't exist.  Something gives me an object not set to instance error.

    <telerik:RadScheduler runat="server" ID="Scheduler1" SelectedView="MonthView" height="100%" allowedit="false" allowdelete="false" allowinsert="false">
        <appointmenttemplate>
            <h6>
                <a href="<%=this.EventUrl %>                
                    <%#((Event)Container.Appointment.DataItem).DateCreated.Year.ToString() %>
                    /<%#((Event)Container.Appointment.DataItem).DateCreated.Month.ToString() %>
                    /<%#((Event)Container.Appointment.DataItem).DateCreated.Day.ToString() %>
                    /<%#Eval("Subject").ToString().Replace(" ", "-").ToLower() %>">
                    <%#Eval("Subject") %>
                </a>
            </h6>
        </appointmenttemplate>
    </telerik:RadScheduler>
  2. Ivan Dimitrov
    Admin
    Ivan Dimitrov avatar
    78 posts

    Posted 06 May 2011 Link to this post

    Hi Scott,

    Please take a look at this post.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top