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

How to count number of appointments in each cell of radscheduler

1 Answer 207 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
K. R.Murthii
Top achievements
Rank 1
K. R.Murthii asked on 17 Jan 2013, 04:12 PM
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.




1 Answer, 1 is accepted

Sort by
0
Accepted
Boyan Dimitrov
Telerik team
answered on 22 Jan 2013, 04:34 PM
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.
Tags
Scheduler
Asked by
K. R.Murthii
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or