Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to find Kendo.Mvc.Examples.Models

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?

like image 620
user3043883 Avatar asked Dec 30 '13 07:12

user3043883


2 Answers

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.

like image 149
Kevin Babcock Avatar answered Sep 19 '22 22:09

Kevin Babcock


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; }
}
like image 40
Matt Millican Avatar answered Sep 21 '22 22:09

Matt Millican