# Large Data Set in Scheduler

## Environment

<table>
    <tbody>
        <tr>
            <td>Product Version</td>
            <td>2023.2.829</td>
        </tr>
        <tr>
            <td>Product</td>
            <td>Scheduler for ASP.NET Core</td>
        </tr>
    </tbody>
</table>

## 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:

```RAZOR
.Read(read=>read.Action("Overview_Read", "Scheduler").Data("additionalData"))
```

```JS
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](https://netcorerepl.telerik.com/cnuXkplF02JV6BYJ06).

Furthermore,  subscribe to the [Navigate Event](https://docs.telerik.com/kendo-ui/api/ui/scheduler/events/navigate) 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

* [ASP.NET MVC Scheduler Documentation](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/scheduling/scheduler/overview)

* [ASP.NET MVC Scheduler Demos](https://demos.telerik.com/aspnet-mvc/scheduler/index)

* [ASP.NET MVC Scheduler Product Page](https://www.telerik.com/aspnet-mvc/scheduler)

* [Telerik UI for ASP.NET MVC Video Onboarding Course (Free for trial users and license holders)](https://www.telerik.com/aspnet-mvc/documentation/getting-started/video-onboarding)

* [Telerik UI for ASP.NET MVC Forums](https://www.telerik.com/forums/aspnet-mvc)

## See Also

* [Client-Side API Reference of the Scheduler for ASP.NET MVC](https://docs.telerik.com/kendo-ui/api/ui/scheduler)
* [Server-Side API Reference of the Scheduler for ASP.NET MVC](https://docs.telerik.com/aspnet-mvc/api/scheduler)
* [Telerik UI for ASP.NET MVC Breaking Changes](https://www.telerik.com/aspnet-mvc/documentation/backwards-compatibility/2023-backwards-compatibility)
* [Telerik UI for ASP.NET MVC Knowledge Base](https://docs.telerik.com/aspnet-mvc/knowledge-base)
