How to count number of appointments in each cell of radscheduler

2 posts, 1 answers
  1. K. R.Murthii
    K. R.Murthii avatar
    19 posts
    Member since:
    Sep 2006

    Posted 17 Jan 2013 Link to this post

    I need to count the number of appointments in a cell, is there any way to count.

    For ex:
    I have 8 appointments in a cell and I am displying only 2 by default and by clicking on more.. link I can see all the appointments.
    But the thing is I want to show the remaing number of assignments in a cell.
    I have counted all the appointments in a cell and appended to the Localization.ShowMore property but it is applying for total Schedular.
    Please help me it is urgernt.




  2. Answer
    Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 22 Jan 2013 Link to this post

    Hello,

    I would recommend you to use the TimeSlotCreated server-side event handler in order to find how many appointments are scheduled for a specific day. Here is a sample code snippet that demonstrates how you can retrieve the appointments count for each time slot:
    //markup code
    <telerik:RadScheduler ID="RadScheduler1" runat="server" OnTimeSlotCreated="RadScheduler1_TimeSlotCreated"></telerik:RadScheduler>
    //code behind
    protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
        {
            if (e.TimeSlot.Appointments.Count > 2)
            {
                 //here goes your custom logic
            }
        }

    Kind regards,
    Boyan Dimitrov
    the Telerik team
    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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top