Grid Multirow Header Groups

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