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?
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.
You'll find the examples (and the referenced models) in the wrappers\aspnetmvc\Examples
folder.
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.
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; }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With