Category / Section
How to Indicate Number of Appointments Exist in ASP.NET MVC Schedule?
1 min read
This knowledge base explains how to retrieve and display the Scheduler appointments (events) count in the toolbar for ASP.NET MVC Schedule. Refer to the following steps to achieve this:
Get the Events count
Step 1: Bind the dataBound event to display the event count dynamically based on the current events displayed in the current view as shown in the following code example.
dataBound: function () { var events = document.querySelectorAll('.e-appointment'); var count = events.length; var target = document.querySelector('.e-toolbar-center'); target.innerText = 'Appointment count:' + count; target.classList.add('count'); }
Data bound : https://ej2.syncfusion.com/javascript/documentation/api/schedule/#databound
Display the events count
Step 2: Run the sample, the event count will be displayed and the text will be centre aligned in the toolbar as follows.
Figure 1: Customized Scheduler Toolbar
Refer to the example from the following stack blitz link.
Example – Appointment count in Scheduler toolbar