The requested page is not available for the requested platform. You are viewing the content for Default platform.

GridViewExtension Class

Represents an extension object implementing the GridView functionality.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v19.2.dll

Declaration

public class GridViewExtension :
    GridExtensionBase
Public Class GridViewExtension
    Inherits GridExtensionBase

Remarks

To declare the GridView in a View, invoke the ExtensionsFactory.GridView helper method. This method returns the GridView extension that is implemented by the GridViewExtension class.

To configure the GridView extension, pass the GridViewSettings object to the ExtensionsFactory.GridView helper method as a parameter. The GridViewSettings object contains all the GridView extension settings.

Concepts

GridView Overview

Example


@Html.DevExpress().GridView(
    settings =>
    {
        settings.Name = "myGridView";
        settings.CallbackRouteValues = new { Controller = "Home", Action = "GridViewPart" };
        settings.Width = 450;

        settings.Columns.Add("ContactName");
        settings.Columns.Add("CompanyName");
        settings.Columns.Add("City").SortOrder = DevExpress.Data.ColumnSortOrder.Ascending;
        settings.Columns.Add("Region");
        settings.Columns.Add("Country");
}).Bind(Model).GetHtml()

Online Demos

Grid View Demos

See Also