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

Forums / Developing with Sitefinity / RadScheduler AppointmentTemplate Class and Size

RadScheduler AppointmentTemplate Class and Size

11 posts, 1 answered
  1. RSewell
    RSewell avatar
    54 posts
    Registered:
    25 Apr 2007
    02 Aug 2011
    Link to this post
    How do you change the size of an AppointmentTemplate? Viewing the rendered source, I see two DIVs that have hard-coded styles with "height:21px".  This is not allowing its size to be adjusted by the content.

    It is also over-riding the class, The DIV I place inside has a class="rsCategoryBlue" but it still has the default yellow (I assume this is coming from the WebBlue skin?).

    Thanks.
  2. RSewell
    RSewell avatar
    54 posts
    Registered:
    25 Apr 2007
    04 Aug 2011
    Link to this post
    Should I place a support ticket for this issue?
  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    04 Aug 2011
    Link to this post
    Hello Rsewell,

    First you need to get the External Templates for Sitefinity controls. Then you need to map the external template for the Events Schedule View (~/Sitefinity/ControlTemplates/Events/EventsScheduleView.ascx) and restart the website.

    Once you have mapped the external template you can try using the MonthView-AdaptiveRowHeight property to set the rows to adjust their height to the appointment :
    <telerik:RadScheduler ID="eventsSchedule" runat="server" MonthView-AdaptiveRowHeight="true">
        <AppointmentTemplate>
            <asp:HyperLink id="eventDetailsLink" runat="server" />
       </AppointmentTemplate>
    </telerik:RadScheduler>

    You can also consider adding a tooltip for the tite: Scheduler / Using RadToolTip

    Mapping the template will give you access to customizing the scheduler and controlling its appearance. You can also check this blog post which explains how to apply custom templates for different appointments.

    Best wishes,
    Radoslav Georgiev
    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
  4. RSewell
    RSewell avatar
    54 posts
    Registered:
    25 Apr 2007
    05 Aug 2011
    Link to this post
    Thank you, Radoslav.

    That is an unbelievably complex solution to what seems to me to be a simple problem. Is that what has been done in the tooltips and templates examples?  If not, how is it that the appointments in those examples expand to fit the contents?  And why is the default NOT to expand?

    Robert

  5. RSewell
    RSewell avatar
    54 posts
    Registered:
    25 Apr 2007
    05 Aug 2011
    Link to this post
    I do not understand this solution.  Is this EventsSchedulerView another name for Appointments, or is the Appointments is based on Events? As far as I can tell, there is no Events Scheduler View, just DayView, WeekView, MonthView and TimelineView.  I'm using only month view.

    In the instructions for mapping an external teemplate, it says each template requires a resource file in the App_LocalResources folder that corresponds to the ascx control.  However, there is no matching one for EventsScheduleView.ascx. How do I find or create this?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    05 Aug 2011
    Link to this post
    Hi Rsewell,

    1. Each event is an appointment which is created by EventsScheduleView class

    2. There are no resource files for this template, because it does not use localization resources.

    Greetings,
    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
  7. RSewell
    RSewell avatar
    54 posts
    Registered:
    25 Apr 2007
    23 Aug 2011
    Link to this post
    "Each event is an appointment which is created by EventsScheduleView class."

    EventsScheduleView.ascx contains a RadScheduler.  Why do I need to modify another copy of a RadScheduler just to make a change in how the RadScheduler in my user control looks?  Even when I try this, it seems to ignore any changes I make to it via EventsScheduleView.

    I am attaching screen shots of my RadScheduler.  The two appointments are styled by an AppointmentTemplate consisting of a DIV that uses a built-in class such as rsCategoryBlue or rsCategoryGreen, and that DIV contains a table with three rows filled with the subject (which is visible) and the From and To times.

    As you can see in both shots, the height of each day cell is more than enough to display all three rows of the table, and yet only the first row is shown in spite of there being plenty of blank space in whcih it could expand.  If I change the RowHeight to 55 (seen in the second attatchment, biggerappts.png), I can now see all of the appointment, but the rows are then much too tall.  AdaptiveRowHeight collapses all the blank rows, and does nothing to change the appointment size, even if I add a MinimumRowHeight.

    Now what?
  8. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    26 Aug 2011
    Link to this post
    Hello Rsewell,

    If you have your own scheduler control you should take the same approach as described for the EventsScheduleView. You should apply this in your schedule not the other control.

    Regards,
    Radoslav Georgiev
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  9. RSewell
    RSewell avatar
    54 posts
    Registered:
    25 Apr 2007
    26 Aug 2011
    Link to this post
    Hi, Radoslav.

    The approach described for the EventsScheduleView was to map the external template and edit it to modify the appointment size.  You now seem to be saying to just apply those modifications to the schedular on my control.  Good, that's more straight forward than the mapping exercise.

    However, nothing I've tried affects the size of my appointments, except to set RowHeight, but that also increases the size of each day cell, and I end up with a huge scheduler with too much space (see BiggerAppts.png in my previous post).

    Setting MonthView-AdaptiveRowHeight = "true" collapses all the rows into unequally-sized rows with no white space, making the scheduler rather unappealing. And, it does not cause the appointment size to expand to show all of it's contents, which is what I am after.
     
    Tooltips only show the user the data if she hovers over the appointment with the mouse, one at a time. They want to see all the details at once without having to involve the mouse.

    I seem to be back where I started.
  10. Veronica
    Veronica avatar
    125 posts
    Registered:
    30 Jan 2015
    29 Aug 2011
    Link to this post
    Hello Rsewell,

    Please take a look at this help article for how to auto expand the height of the appointments to accommodate the entire subject.

    I hope this will help you. Write back if you need more help.

    Best wishes,
    Veronica Milcheva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

    Answered
  11. RSewell
    RSewell avatar
    54 posts
    Registered:
    25 Apr 2007
    30 Aug 2011
    Link to this post
    Thank you, Veronica. You are my hero of the month! That is exactly what I needed.

    Peter's solution is pure CSS, and I suspcted that would be a big part of the answer.  All the CSS I tried to add was ignored by the control, which means that the built-in CSS classes over-ride anything added to the control by us users. The trick is to use the same class names that are built in by Telerik. Are these classes documented anywhere?
Register for webinar
11 posts, 1 answered