5

I am trying to create a kendo schedular 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 tel me where I can find it? I have been looking for over 5 hours now. please help

user3043883
  • 117
  • 3
  • 5

2 Answers2

6

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
  • 9,828
  • 18
  • 66
  • 88
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
  • 3,964
  • 4
  • 34
  • 54