How to highlight weekends in timeline view using SpecialSlots

4 posts, 0 answers
  1. Jiri
    Jiri avatar
    40 posts
    Member since:
    Oct 2013

    Posted 12 Nov 2013 Link to this post

    Hi all,

    I am playing with demo examples specifically with SpecialSlots project, but I am unable to set weekends highlited. I changed view to timeline:

    <telerik:RadScheduleView.ActiveViewDefinition>
        <telerik:TimelineViewDefinition />
        <!--<telerik:WeekViewDefinition StretchGroupHeaders="True" FirstDayOfWeek="Monday" VisibleDays="5" />-->
    </telerik:RadScheduleView.ActiveViewDefinition>

    and changed function CreateReadOnlySlot() to fit my needs:

    private Slot CreateReadOnlySlot()
    {
       Slot slot = new Slot();
       slot.Start = new DateTime(2013,11,9);
       slot.End = new DateTime(20131110); 
       slot.RecurrencePattern = new RecurrencePattern(nullRecurrenceDays.Saturday | RecurrenceDays.Sunday, RecurrenceFrequency.Weekly, 1nullnull);
       slot.Resources.Add(new Resource("Team""Calendar"));
     
       return slot;
    }

    but there is no highlighting in result. So how to set it ? Is It needed to set Start and End when I want to set recurrence for every weekend?

    Thanks
  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 13 Nov 2013 Link to this post

    Hi Jiri,

    You also need a custom SpecialSlotStyleSelector with the required template in order to change their appearance. Please check the Special and ReadOnly slots article from our online help documentation. For you convenience I prepared a sample project which demonstrates the exact approach.

    Hope this helps.

    Regards,
    Kalin
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
  4. Jiri
    Jiri avatar
    40 posts
    Member since:
    Oct 2013

    Posted 13 Nov 2013 Link to this post

    Hi Kalin,

    Thank you for your reply. I finaly resolve it, although It was not caused by the SpecialSlotStyleSelector - that was set.
    The problem was in Slot.Resources - it was set too, but in a particular resources was a missing type, and it caused that no highlighted result.

    So your reply at least help me to check it all again.

    Regards,
    Jiri
  5. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 14 Nov 2013 Link to this post

    Hi Jiri,

    I'm glad you managed to resolve the problem.

    If you have any other questions let us know.

    Regards,
    Kalin
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top