ASP.NET MVC Controls | ComponentOne
In This Topic
    Scaffolding
    In This Topic

    The steps to scaffold ComponentOne MultiRow control for ASP.NET MVC are as follows:

    1. Configure a datasource in your application. For more information on configuring a datasource, see Data Source Configuration topic.
    2. In the Solution Explorer, right-click the project name and select Add|New Scaffolded Item. The Add Scaffold wizard appears.

    3. In the Add Scaffold wizard, select Common and then select C1 Scaffolder from the right pane. You can also select Common|MVC|Controller or Common|MVC|View and then C1 Scaffolder to add only a controller or a view.

    4. Click Add.

    5. In the Add Scaffold dialog, select MultiRow control, and the click Next.


      The C1 ASP.NET MVC MultiRow wizard appears with the General tab selected by default.

    6. In the General tab, specify the model details as follows:

      1. Enter the Controller Name and View Name.
      2. Select Model Class from the drop-down list. The list shows all the available model types in the application in addition to the C1NWind.edmx model added in Step 1. In our case, we select Product to populate data in MultiRow.
      3. Select Data Context Class from the drop-down list. In our case, we select C1NWindEntities.


    7. In the Cells tab on the left, un-check the Auto Generate Columns option to add, delete, or move columns upward or downward in the sequence according to your requirements. In our case, we have selected columns as shown in the image below.

    8. In the Editing tab, check the Allow Edit and Allow Delete options.
    9. In the Grouping tab, under the Group Settings, check CategoryID from Group Descriptions section.
    10. In the Filtering tab, check the Allow Filtering option.
    11. Click Add. You will notice that the Controller and View for the selected model are added to your project. Once the code is generated, you can run the project using the F5 button.