MVC5 Classic
wijgrid Step 2 of 4: Creating the Controller

In the previous step, you created a model. In this step, you'll create a controller to return the items in the Products table from the model.

Complete the following steps:

  1. In Solution Explorer, expand the Controllers node and then double-click HomeController.
  2. Add the following import statement to the list of directives (replacing "PROJECTNAME" with the name of your project):

    Visual Basic

    C#

  3. Replace the existing code in the HomeController class with the following code:

    Visual Basic

    C#

    This code specifies the model that is used to populate the grid and the view that will be rendered as a response to the data population.

Now that you've created the model and the controller, you can create the view, which will consist of a table and appear on the homepage of the project, in wijgrid Step 3 of 4: Creating the View.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback