Bug tracker: Create the BugMaster view

After you create a ProjectMaster view, you create the BugMaster view. The BugMaster view displays the list of available projects. It is represented by a Razor web page. To create the view:

  1. In Visual Studio, navigate to the Areas » BugTracker » Views » Bug folder, create a new file with the cshtml extension.
    Name the class BugMaster.
  2. Add using statements to the following namespaces:
    • Telerik.Web.Mvc.UI
    • Telerik.Sitefinity.Model
    • Telerik.Sitefinity.DynamicModules.Model
  3. Define the type of the Model property.
    Use the same type as the type of the data that you passed as the model argument to the View method in the project controller.
  4. Create a grid to display the bugs.
    To create a grid, use the Telerik MVC Extensions:
    1. Call the Telerik method of the HtmlHelper object.
    2. Call the Grid method and pass the value of the Model property of the view.
    3. Set the name of the grid by calling the Name method.
    4. Define the columns of the grid by calling the Columns method.
    5. To define the columns, use the columns argument.
    6. Use the Template method to define what to be displayed in the column. Use the Title method to specify the title of the column.
  5. Call the SciptRegistrar method of the Telerik view component factory.

GITHUB EXAMPLE: For more information about the content of the file, see the BugMaster.cshtml file of the downloaded sample project.

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?