This is a migrated thread and some comments may be shown as answers.

Show only all day events

7 Answers 209 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ramu
Top achievements
Rank 1
Ramu asked on 01 Feb 2012, 04:22 AM
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.

7 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 01 Feb 2012, 05:57 AM
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.
0
TPerry
Top achievements
Rank 1
answered on 27 Feb 2014, 02:46 PM
This works great for the Day and Week view, but is there a solution for the Month view?
0
Boyan Dimitrov
Telerik team
answered on 04 Mar 2014, 12:09 PM
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.
0
TPerry
Top achievements
Rank 1
answered on 05 Mar 2014, 02:25 PM
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?
0
Boyan Dimitrov
Telerik team
answered on 10 Mar 2014, 11:51 AM
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.

0
TPerry
Top achievements
Rank 1
answered on 11 Mar 2014, 02:07 PM
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!
0
Boyan Dimitrov
Telerik team
answered on 14 Mar 2014, 09:30 AM
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.

 
Tags
Scheduler
Asked by
Ramu
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
TPerry
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or