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

Scheduler Monthview, modify "More..." text with appointment count

2 Answers 57 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Lakpa
Top achievements
Rank 1
Lakpa asked on 14 Feb 2014, 10:06 PM
Hi,
    Is it possible to modify "More..." text in Month view.
 When we have many appointments then we get this text at the bottom, I want to modify it from server side so that I can put number of appointments in per day.

Thank you.

2 Answers, 1 is accepted

Sort by
0
Accepted
Plamen
Telerik team
answered on 17 Feb 2014, 12:09 PM
Hi,

Here is the code that could help you achieve similar functionality:
Copy Code
protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
   {
       RadScheduler scheduler = (RadScheduler)sender;
       if (scheduler.SelectedView==SchedulerViewType.MonthView)
       {
           if (e.TimeSlot.Appointments.Count>0)//count of visible appointments
           {
               int visibleAppointments = RadScheduler1.MonthView.VisibleAppointmentsPerDay;
               int realCountOfAppointments= scheduler.Appointments.GetAppointmentsInRange(e.TimeSlot.Start, e.TimeSlot.End).Count;//count of all appointments in the timespan
 
               if (realCountOfAppointments - visibleAppointments>0)
               {
                   e.TimeSlot.CssClass = (realCountOfAppointments - visibleAppointments) + "moreAppointments";
               }
              
           }
       }
   }

Copy Code
function pageLoad() {
                var $ = $telerik.$;
                $("[class$='moreAppointments']").each(function (index, elem) {
                    $(this).find(".rsShowMore").text($(this).attr("class").substring(0, $(this).attr("class").indexOf("moreAppointments")) + " more");
                });
            }

Hope this will help you solve the issue.

Regards,
Plamen
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
Lakpa
Top achievements
Rank 1
answered on 17 Feb 2014, 02:21 PM
Thank you.

It solved my problem.
Tags
Scheduler
Asked by
Lakpa
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Lakpa
Top achievements
Rank 1
Share this question
or