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

3 posts, 1 answers
  1. Lakpa
    Lakpa avatar
    13 posts
    Member since:
    Dec 2013

    Posted 14 Feb 2014 Link to this post

    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. Answer
    Plamen
    Admin
    Plamen avatar
    2734 posts

    Posted 17 Feb 2014 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Lakpa
    Lakpa avatar
    13 posts
    Member since:
    Dec 2013

    Posted 17 Feb 2014 Link to this post

    Thank you.

    It solved my problem.
Back to Top