Example of Stacked Header in ASP.NET MVC Tree Grid Control
This sample demonstrates the Tree Grid component with the stacked header feature. In this sample, we have shown multiple levels of column header.
Order Details | Shipment Details | Price Details | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Order ID | Order Name | Order Date | Category | Shipped Date | Units | Unit Price | Total Price | |||
1 | Order 1 | 3/2/2017 | Seafood | 9/2/2017 | 1395 | $47.00 | $65,565.00 |
1.1 | Mackerel | 3/3/2017 | Frozen Seafood | 10/3/2017 | 235 | $12.00 | $2,820.00 |
1.2 | Yellowfin Tuna | 3/5/2017 | Frozen Seafood | 10/5/2017 | 324 | $8.00 | $2,592.00 |
1.3 | Herrings | 8/5/2017 | Frozen Seafood | 5/15/2017 | 488 | $11.00 | $5,368.00 |
1.4 | Preserved Olives | 6/10/2017 | Edible | 6/17/2017 | 125 | $9.00 | $1,125.00 |
1.5 | Sweet corn Frozen | 7/12/2017 | Edible | 7/19/2017 | 223 | $7.00 | $1,561.00 |
2 | Order 2 | 1/10/2017 | Seafood | 1/16/2017 | 1944 | $58.00 | $21,233.00 |
2.1 | Tilapias | 2/5/2017 | Frozen Seafood | 2/12/2017 | 278 | $15.00 | $4,170.00 |
2.2 | White Shrimp | 5/22/2017 | Frozen Seafood | 5/29/2017 | 560 | $7.00 | $3,920.00 |
2.3 | Fresh Cheese | 6/8/2017 | Dairy | 6/15/2017 | 323 | $12.00 | $3,876.00 |
2.4 | Blue Veined Cheese | 7/10/2017 | Dairy | 7/17/2017 | 370 | $15.00 | $5,550.00 |
2.5 | Butter | 9/18/2017 | Dairy | 9/25/2017 | 413 | $9.00 | $3,717.00 |
The Tree Grid Columns can be stacked/grouped in order to show multiple levels of column header. It can be done by setting the Columns->Columns
property.
In this demo, the Columns Order ID, Order Name, Order Date are grouped under Order Details, the columns Shipment Category, Shipped Date, Units are grouped under Shipment Details and Unit Price, Total Price are grouped under Price details. More information on the stacked header configuration can be found in this documentation sectionopens in a new tab.