From ec5b3f70096a1d0ce9a659a15633f5e6459648e2 Mon Sep 17 00:00:00 2001 From: KB Bot Date: Mon, 4 Aug 2025 07:19:00 +0000 Subject: [PATCH] Added new kb article scheduler-monthview-daily-appointment-count --- ...duler-monthview-daily-appointment-count.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 knowledge-base/scheduler-monthview-daily-appointment-count.md diff --git a/knowledge-base/scheduler-monthview-daily-appointment-count.md b/knowledge-base/scheduler-monthview-daily-appointment-count.md new file mode 100644 index 000000000..762f40dd1 --- /dev/null +++ b/knowledge-base/scheduler-monthview-daily-appointment-count.md @@ -0,0 +1,74 @@ +--- +title: Displaying Appointment Count in RadScheduler MonthView +description: Learn how to show the count of appointments for each day in the MonthView of the RadScheduler for UI for ASP.NET AJAX. +type: how-to +page_title: Setting Up Daily Appointment Counts in RadScheduler MonthView +meta_title: Setting Up Daily Appointment Counts in RadScheduler MonthView +slug: scheduler-monthview-daily-appointment-count +tags: scheduler, ui for asp.net ajax, timeslotcreated, monthview, daily appointment count +res_type: kb +ticketid: 1695244 +--- + +## Environment + + + + + + + + + + + + +
ProductScheduler for UI for ASP.NET AJAX
VersionAll
+ +## Description + +I want to show the count of appointments for each day in the MonthView of the RadScheduler control for UI for ASP.NET AJAX. My stored procedure also returns the daily count, so I need guidance for either using the built-in appointment count or mapping my stored procedure results. + +This knowledge base article also answers the following questions: + +- How to customize RadScheduler MonthView cells? +- How to display appointment counts using RadScheduler TimeSlotCreated? + +## Solution + +Use the [TimeSlotCreated](https://www.telerik.com/products/aspnet-ajax/documentation/controls/scheduler/server-side-programming/server-events/timeslotcreated) server-side event to customize each day cell in the MonthView of the RadScheduler. You can use `e.TimeSlot.Appointments.Count` to display the count of built-in appointments or map the results of your stored procedure to show the daily count. + +Example Using Built-In Appointment Count + +````C# +protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e) +{ + if (RadScheduler1.SelectedView == SchedulerViewType.MonthView) + { + int count = e.TimeSlot.Appointments.Count; + + if (count > 0) + { + RadLabel lbl = new RadLabel() + { + Text = $"
{count}
", + CssClass = "daily-count-label", + }; + + e.TimeSlot.Control.Controls.Add(lbl); // Add label to the day cell + } + } +} +```` + +Example Styling for Appointment Count + +````CSS +.daily-count-label { + background-color: red; + border-radius: 50%; + color: white; + padding: 5px; +} +```` +