The GroupHeader column property allows you select one or more columns to be used to separate groups of rows based on the change in value of any of the specified columns.

Help
Orders

Customers
Razor
                                    
                                        
DbNetGridCore ordersGrid = new DbNetGridCore("northwind", "orders", "ordersGrid")
{
    Columns = new List() { "OrderID", "CustomerID", "EmployeeID", "OrderDate", "RequiredDate", "ShippedDate", "ShipVia", "Freight" },
    Labels = new List() { "Order ID", "Customer ID", "Employee", "Date Ordered", "Date Required", "Date Shipped", "Ship Via", "Freight" },
    PageSize = 10
};
ordersGrid.SetColumnAsGroupHeader(new string[] { "CustomerID" });
ordersGrid.SetColumnLookup("EmployeeID", new Lookup("Employees", "EmployeeId", "lastname + ',' + firstname"));
ordersGrid.SetColumnLookup("CustomerID", new Lookup("Customers", "CustomerId", "CompanyName"));
ordersGrid.SetColumnLookup("ShipVia", new Lookup("Shippers", "ShipperId", "CompanyName"));
@ordersGrid.Render()

DbNetGridCore customersGrid = new DbNetGridCore("northwind", "customers", "customersGrid")
{
    Columns = new List() { "ContactName", "ContactTitle", "Address", "Region", "PostalCode", "Phone", "Fax", "Country", "City" },
    PageSize = 10
};
customersGrid.SetColumnAsGroupHeader(new String[] { "Country", "City" });

@customersGrid.Render()