Orders administration

This page demonstrates the possibilities of Grid.Mvc. For more documentation, please see: http://gridmvc.codeplex.com/

Show code to build this grid
    @Html.Grid(Model).Columns(columns =>
    {
        /* Adding not mapped column, that renders body, using inline Razor html helper */
        columns.Add()
                .Encoded(false)
                .Sanitized(false)
                .SetWidth(30)
                .RenderValueAs(d =>
                    @
                        @Html.ActionLink("Edit", "Index")
                    );

        /* Adding "OrderID" column: */
        columns.Add(o => o.OrderID)
                .Titled("Number")
                .SetWidth(100);

        /* Adding "OrderDate" column: */
        columns.Add(o => o.OrderDate, "OrderCustomDate")
                .Titled("Date")
                .SortInitialDirection(GridSortDirection.Descending)
                .Format("{0:dd/MM/yyyy}")
                .SetWidth(110);

        /* Adding "CompanyName" column: */
        columns.Add(o => o.Customer.CompanyName)
                .Titled("Company Name")
                .ThenSortByDescending(o => o.OrderID)
                .SetFilterWidgetType("CustomCompanyNameFilterWidget");

        /* Adding "Vip customer" column: */
        columns.Add(o => o.Customer.IsVip)
                .Titled("Vip customer")
                .SetWidth(150)
                .RenderValueAs(o => CustomRenderingOfColumn(o));

    }).SetRowCssClasses(item => item.Customer.IsVip ? "warning" : string.Empty).WithPaging(15).Sortable().Filterable().WithMultipleFilters()
    

Order details

Select order to display detailed infomation

1107406/05/1998Simons bistro
1107506/05/1998Richter Supermarkt
1107606/05/1998Bon app'
1107706/05/1998Rattlesnake Canyon Grocery
1107005/05/1998Lehmanns Marktstand
1107105/05/1998LILA-Supermercado
1107205/05/1998Ernst Handel
1107305/05/1998Pericles Comidas clásicas
1106704/05/1998Drachenblut Delikatessen
1106804/05/1998Queen Cozinha
1106904/05/1998Tortuga Restaurante
1106401/05/1998Save-a-lot Markets
1106501/05/1998LILA-Supermercado
1106601/05/1998White Clover Markets
1106030/04/1998Franchi S.p.A.