The Scheduler HtmlHelper for ASP.NET MVC enables you to use the Kendo UI Scaffolder Visual Studio extension.
The Kendo UI Scaffolder will not include the required UI for ASP.NET MVC files to the project. To automatically achieve this, use the Telerik UI for ASP.NET MVC Visual Studio Extensions. To manually achieve this, refer to this article.
To scaffold the Scheduler HtmlHelper for ASP.NET MVC:
- Create a new ASP.NET MVC application, include an Entity Framework Data Model, and add Telerik UI for ASP.NET MVC.
Right-click the location where the
Scheduler Controllershould be generated. Select Add > New Scaffolded Item... from the displayed menu. In this example, you are going to generate it in the Controllers folder.
Select Kendo UI Scaffolder from the list of available scaffolders. Then choose the desired Scheduler option.
On the next screen that displays the
Data Contextoptions, enter the
The Model Class drop-down list contains all model types from the active project. List the products in the Scheduler. In this case, select the Product entity.
From the Data Context Class DropDownList, select the Entity Framework Data Model class to be used. In this case, select SampleEntities. Note that the DataBase used is taken from the offline examples.
Select the fields from your original model that match the fields from the required
ISchedulerEventinterface. The Scaffolder automatically generates a view model that inherits from the
ISchedulerEventinterface. This view model includes a constructor and a method that map the view model fields to the original model:
The newly created class will later be added to the
Click Scheduler Options.
This screen contains the Scheduler functionalities that can be configured before scaffolding:
- DataSource Type—Ajax or WebApi.
- Edit operations—Configures the operations to be included (Create, Update, Destroy, Resize, Move).
- Other options > PDF Export—Enables the PDF export functionality.
- Other options > Selectable—Enables the selection functionality.
- Scheduler Views—Opts for the desired views.
Click Events. Select the Scheduler events that you want to attach handlers to.
When finished with the Scheduler configuration, click Add. The
Scheduler Controllerand the corresponding
Vieware now generated.