New to Telerik UI for ASP.NET MVC? Download free 30-day trial


The Grid 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 Grid HtmlHelper for ASP.NET MVC:

  1. Create a new ASP.NET MVC application, include an Entity Framework Data Model and add Telerik UI for ASP.NET MVC. If you have already done so, move on to the next step. Otherwise, follow the first four steps described in this article.
  2. Right-click the location where the Grid Controller should be generated. Select Add > New Scaffolded item... from the displayed menu. In this example, you generate it in the Controllers folder.

    A new scaffolded item

  3. Select Kendo UI Scaffolder from the list of available scaffolders.

    Choosing the Kendo UI Scaffolder

  4. On the next screen, you are presented with the Model and Data Context options. Enter the Controller and View names.

    Providing the Controller name

    The Model Class DropDownList contains all model types from the active project. In this example, you list products in the Grid. Select the Product entity.

    Choosing the Model class

    From the Data Context Class DropDownList, select the Entity Framework Data Model class to be used. In this example it is NorthwindEntities.

    Choosing the Data Context class

  5. (Optional) In some scenarios it is convenient to use view model objects instead of the entities returned by the Entity Framework. If this is the case, check the Use an existing ViewModel checkbox. It displays a drop-down list similar to the first one from which you can select the ViewModel that will be used.

    If you have not created it yet, add a new class to the ~/Models folder. Name it ProductViewModel.

    public class ProductViewModel
        public int ProductID { get; set; }
        public string ProductName { get; set; }
        public short? UnitsInStock { get; set; }

    Select the ProductViewModel class from the ViewModel Class drop-down list.

    Selecting the ViewModel Class

    The names of the properties in the ViewModel must be exactly the same as the corresponding ones in the Entity. Otherwise, the Kendo UI Scaffolder is not able to link them correctly.

  6. Click the Grid options item on the left.

    Selecting the Grid options

    This screen contains the Grid functionalities that can be configured before scaffolding:

    • DataSource Type—Ajax, Server, or WebApi.
    • Editable—Enable the editing, configure the edit mode—InLine, InCell, or PopUp—and the operations that will be included—Create, Update, Destroy.

      Selecting the editable options

    • Filterable—Enable the filtering of the Grid and select the filter mode.

      Selecting the filterable options

    • Column Menu—Enable the column menu.

    • Navigatable—Enable the keyboard navigation.
    • Pageable—Enable the paging of the Grid.
    • Reorderable—Enable the column reordering.
    • Scrollable—Enable the scrolling of the Grid table.
    • Selectable—Enable the selection and specify the selection mode and type.

      Selecting the selectable options

    • Sortable—Enable the sorting and specify the sorting mode.

      Selecting the sortable options

    • Excel Export—Enable the Excel export functionality.

    • PDF Export—Enable the PDF export functionality.
  7. Click the Events item on the left.

    The Events item in the Grid options

    From this screen, you can select the Grid events to which you want to attach handlers.

    Not all events are supported in the server-binding mode. To see the complete list, refer to this article.

  8. When finished with the Grid configuration, click Add at the bottom. The Grid Controller and the corresponding View are now generated.

See Also

In this article
Not finding the help you need? Improve this article