Show only all day events

8 posts, 0 answers
  1. Ramu
    Ramu avatar
    1 posts
    Member since:
    Jan 2011

    Posted 31 Jan 2012 Link to this post

    I have a requirement to show only all day events in the week view and day view.  I was wondering if there is way to hide time lines in RAD Scheduler?  I can increase All day event height using rsAllDayRow class, but that does not help.

    Thanks for your help.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 31 Jan 2012 Link to this post

    Hello,

    Try the following CSS to show only all day events in the week view and day view.

    CSS:
      .rsContentTable
       {
        display:none !important;
      }
    .rsWrap,.rsLastSpacingWrapper
      {
        height:100px !important;
      }

    You can set the TimelineView-UserSelectable property to false to hide the Timeline Navigation Button.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. TPerry
    TPerry avatar
    47 posts
    Member since:
    Jul 2006

    Posted 27 Feb 2014 Link to this post

    This works great for the Day and Week view, but is there a solution for the Month view?
  5. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 04 Mar 2014 Link to this post

    Hello,

    I would like to clarify that month view is designed to show appointment for a specific day no matter of the appointment duration. So if your appointment starts at 8AM and ends at 9 AM it will be shown the same way as one all day appointment for that day. So a valid solution for the month view will be hide the appointments that are not all day. You can achieve such functionality by simply using the AppointmentDataBound event and hide the appointment as shown in the code snippet.
    //code behind
    protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
        {
            //if the current appointment is not all day
            e.Appointment.Visible = false;
        }


    Regards,
    Boyan Dimitrov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
  6. TPerry
    TPerry avatar
    47 posts
    Member since:
    Jul 2006

    Posted 05 Mar 2014 in reply to Boyan Dimitrov Link to this post

    Thank you for response.  What I actually meant to say (but didnt) was that the css changes Princy describes above works great for the Day and Week View, but when I switch to the Month view, nothing is visible because of the display:none tag.  Is there a solution that will only show All Day Events in the Day and Week Views, but also works for the Month View?
  7. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 10 Mar 2014 Link to this post

    Hello,

    Please use the following workaround:
    //css
    .rsDayView .rsContentTable,
    .rsWeekView .rsContentTable {
        display: none !important;
    }
     
    .rsDayView .rsWrap, .rsLastSpacingWrapper,
    .rsWeekView .rsWrap, .rsLastSpacingWrapper {
        height: 100px !important;
    }

    The month view in this case will show its content table with appointments as expected.

    Regards,
    Boyan Dimitrov
    Telerik

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

  8. TPerry
    TPerry avatar
    47 posts
    Member since:
    Jul 2006

    Posted 11 Mar 2014 in reply to Boyan Dimitrov Link to this post

    This code works perfectly!  Except....  when you are in the Day or Week View and no appointments are displayed, if you click the down arrow next to 'Today' to select another date.  It's cut off.  So close!!!  Any ideas?  Thank you!
  9. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 14 Mar 2014 Link to this post

    Hello,

    I would like to clarify that in this case the embedded calendar is cut-off because the total height of the RadScheduler is smaller than the calendar. In this case the only workaround is to use an external RadCalendar inside a RadWindow that will replace the inbuilt one. Please find  here a knowledge base article that shows how you can achieve it.

    Regards,
    Boyan Dimitrov
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017