Grid Multirow Header Groups

Drag a column header and drop it here to group by that column
Id
Main details
Price
Dinner details
Date
Address
Chef
Person
Food
Location
Country
First Name
Last Name
3675MaryShepherd's pie1811/19/2022DinerLa CroisettePepperTomato
3671JeremyPizza796/13/2010TavernRegentDemeterHarvest
3667JohnCheesecake1009/25/2015RestaurantWinterspringJoshBaskin
3663MichaelHot Beverage202/13/2012VisitJisinaPepperTomato
3659GabrielleFrench toast455/19/2016TavernGoldshireOmuMan
3655LucyBig Salad704/3/2019TavernStormwindOmuMan
3651CheyenneBig Salad7011/1/2017VisitWestfallOmuMan
3647JonahShepherd's pie234/27/2020VisitSylvanaarJoannaStan
3643FernandoSoup505/7/2010UniversityGhidrimestiChefChef
3639AudreyShepherd's pie705/17/2011UniversityPiccadillyCharlesDuchemin
show code
GridMultiRowHeaderGroups/Index.cshtml

@(Html.Awe().Grid("GridHg")
.Mod(o => o.Main())
.HeaderGroups(
new HeaderGroup { Content = "Main details", Level = 0, Id = "main" },
new HeaderGroup { Content = "Dinner details", Level = 0, Id = "dinfo" },
new HeaderGroup { Content = "Chef", Id = "chef", Level = 1 },
new HeaderGroup { Content = "Address", Id = "addr", Level = 1 })
.Columns(
new Column { Bind = "Id", Width = 75, Groupable = false, Resizable = false },
new Column { Bind = "Person", HeaderGroups = new[] { "main" } },
new Column { Bind = "Food.Name", HeaderGroups = new[] { "main" } },
new Column { Bind = "Price", Width = 100 },
new Column { Bind = "Date", Width = 120, HeaderGroups = new[] { "dinfo" } },
new Column { Bind = "Location", HeaderGroups = new[] { "dinfo", "addr" } },
new Column { Bind = "Country.Name", Header = "Country", HeaderGroups = new[] { "dinfo", "addr" } },
new Column { Bind = "Chef.FirstName", ClientFormat = ".(ChefFName)", Header = "First Name", HeaderGroups = new[] { "dinfo", "chef" } },
new Column { Bind = "Chef.LastName", ClientFormat = ".(ChefLName)", Header = "Last Name", HeaderGroups = new[] { "dinfo", "chef" } })
.Url(Url.Action("LunchGrid", "Data"))
.Resizable()
.Reorderable()
.Height(400))



Comments