New to Telerik UI for ASP.NET MVC? Download free 30-day trial

Large Data Set in Scheduler

Environment

Product Version 2023.2.829
Product Scheduler for ASP.NET Core

Description

We have implemented a Telerik UI for ASP.NET MVC Scheduler and have 500K+ entries of data. We cannot call GetAll() to load all the data in one go as it crashes the Scheduler.

Solution

To control the number of events that are populated in the Telerik UI for ASP.NET MVC Scheduler add the current date and the currently selected view as additional data to the Read transport of the DataSource:

.Read(read=>read.Action("Overview_Read", "Scheduler").Data("additionalData"))
function additionalData(e){
        var scheduler = $("#scheduler").data("kendoScheduler");
        var date = scheduler.date();
        var view = scheduler.viewName();
        var data = { Date: date, View: view };
        return data;
    }

This will allow you to use the Date and View type (for example 'week') at the server-side to return events only for that time period.

Review the code above in this Telerik REPL example.

Furthermore, subscribe to the Navigate Event of the Scheduler. In the handler of the event you can force another read request to ensure new data is applied when the selected View or Date change.

More ASP.NET MVC Scheduler Resources

See Also

In this article