6

I am trying to create a Kendo Scheduler, but you need to pass in a model. In the examples it tells you to use:

@(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.TaskViewModel>())

But of course I don't have this view model. Can someone tell me where I can find it?

Syscall
  • 19,327
  • 10
  • 37
  • 52
user3043883
  • 127
  • 3
  • 5

3 Answers3

7

The models referenced in the KendoUI for ASP.NET MVC examples are not part of the Kendo.Mvc.dll assembly. Instead, you must download them from your Telerik account. Go to telerik.com and sign in. From there, navigate to your Products & Subscriptions and locate "KendoUI for ASP.NET MVC" and select "Browse all product files". Download the "Manual Installation" file and unzip it.

enter image description here

You'll find the examples (and the referenced models) in the wrappers\aspnetmvc\Examples folder.

enter image description here

If you want to reference the models in your project, just grab a copy of the compiled assembly Kendo.Mvc.Examples.dll from the bin folder of the example project. Keep in mind this will include everything from the examples (controllers, models, view-models, etc.).

I hope that helps.

Kevin Babcock
  • 10,187
  • 19
  • 69
  • 89
5

Your model simply has to implement ISchedulerEvent.

An example of one of mine is below:

public class AvailableDateModel : ISchedulerEvent
{
    public string Title { get; set; }
    public bool IsAllDay { get; set; }
    public DateTime Start { get; set; }
    public DateTime End { get; set; }

    public string Description { get; set; }
    public string StartTimezone { get; set; }
    public string EndTimezone { get; set; }
    public string RecurrenceRule { get; set; }
    public string RecurrenceException { get; set; }
}
Matt Millican
  • 4,044
  • 4
  • 38
  • 55
0

Here's an update to @Kevin Babcock's answer.

To view the Telerik example models:

  1. Log in to your Telerik account.
  2. Click on Downloads.
  3. Click on Progress Telerik UI for ASP.NET MVC
  4. Under Other Setup Files, click on telerik.ui.for.aspnetmvc.[release].commercial.zip.
  5. Extract and navigate to: wrappers\aspnetmvc\examples\MVC5\
  6. Open the Kendo.Mvc.Examples.sln or browse the Kendo.Mvc.Examples folder to find the model you're looking for.
mmcfly
  • 834
  • 8
  • 12