Example of Row Spanning (API) in ASP.NET MVC Tree Grid Control
This sample demonstrates how the Tree Grid automatically merges adjacent cells containing same value across both rows and columns.
@* The editor's settings are in the view; the data they read (ViewData) is set in the controller action (see the controller tab). *@
@Html.UiTreeGrid(new UiTreeGridOptions
{
Id = "RowSpanning",
Data = ViewData["datasource"],
EnableHover = false,
GridLines = UiGridLines.Both,
EnableRowSpan = true,
EnableColumnSpan = true,
AllowPaging = true,
PageSize = 18,
ChildMapping = "Children",
TreeColumnIndex = 0,
Height = "400px",
Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "ActivityName", HeaderText = "Phase Name", Width = 250, Freeze = UiFreezeDirection.Left },
new UiGridColumn
{
HeaderText = "Schedule", TextAlign = UiTextAlign.Center, Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "StartDate", HeaderText = "Start Date", Type = UiColumnType.Date, Width = 140, Format = "M/d/yyyy", TextAlign = UiTextAlign.Center },
new UiGridColumn { Field = "EndDate", HeaderText = "End Date", Type = UiColumnType.Date, Width = 140, Format = "M/d/yyyy", TextAlign = UiTextAlign.Center }
}
},
new UiGridColumn
{
HeaderText = "Work Status", TextAlign = UiTextAlign.Center, Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "Status", HeaderText = "Status", Width = 140, TextAlign = UiTextAlign.Center }
}
},
new UiGridColumn
{
HeaderText = "Compliance", TextAlign = UiTextAlign.Center, Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "PermitStatus", HeaderText = "Permit Status", Width = 120, TextAlign = UiTextAlign.Center },
new UiGridColumn { Field = "InspectionDate", HeaderText = "Inspection Date", Type = UiColumnType.Date, Width = 180, Format = "M/d/yyyy", TextAlign = UiTextAlign.Center },
new UiGridColumn { Field = "InspectionStatus", HeaderText = "Inspection Status", Width = 180, TextAlign = UiTextAlign.Center },
new UiGridColumn { Field = "PunchListStatus", HeaderText = "Punch List Status", Width = 150, TextAlign = UiTextAlign.Center }
}
},
new UiGridColumn
{
HeaderText = "Personnel", TextAlign = UiTextAlign.Center, Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "Supervisor", HeaderText = "Supervisor", Width = 180 },
new UiGridColumn { Field = "Team", HeaderText = "Crew", Width = 200 }
}
},
new UiGridColumn
{
HeaderText = "Materials", TextAlign = UiTextAlign.Center, Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "MaterialUsed", HeaderText = "Material Used", Width = 180, TextAlign = UiTextAlign.Center },
new UiGridColumn { Field = "MaterialCost", HeaderText = "Material Cost", Width = 140, TextAlign = UiTextAlign.Center }
}
},
new UiGridColumn
{
HeaderText = "Cost Summary", TextAlign = UiTextAlign.Center, Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "TotalBudget", HeaderText = "Planned Budget", Type = UiColumnType.Number, Width = 140, Format = "C2", TextAlign = UiTextAlign.Center },
new UiGridColumn { Field = "PaidToDate", HeaderText = "Actual Spend", Type = UiColumnType.Number, Width = 140, Format = "C2", TextAlign = UiTextAlign.Center }
}
}
}
})
@Html.UiTreeGrid(new UiTreeGridOptions
{
Id = "RowSpanning",
Data = ViewData["datasource"],
EnableHover = false,
GridLines = UiGridLines.Both,
EnableRowSpan = true,
EnableColumnSpan = true,
AllowPaging = true,
PageSize = 18,
ChildMapping = "Children",
TreeColumnIndex = 0,
Height = "400px",
Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "ActivityName", HeaderText = "Phase Name", Width = 250, Freeze = UiFreezeDirection.Left },
new UiGridColumn
{
HeaderText = "Schedule", TextAlign = UiTextAlign.Center, Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "StartDate", HeaderText = "Start Date", Type = UiColumnType.Date, Width = 140, Format = "M/d/yyyy", TextAlign = UiTextAlign.Center },
new UiGridColumn { Field = "EndDate", HeaderText = "End Date", Type = UiColumnType.Date, Width = 140, Format = "M/d/yyyy", TextAlign = UiTextAlign.Center }
}
},
new UiGridColumn
{
HeaderText = "Work Status", TextAlign = UiTextAlign.Center, Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "Status", HeaderText = "Status", Width = 140, TextAlign = UiTextAlign.Center }
}
},
new UiGridColumn
{
HeaderText = "Compliance", TextAlign = UiTextAlign.Center, Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "PermitStatus", HeaderText = "Permit Status", Width = 120, TextAlign = UiTextAlign.Center },
new UiGridColumn { Field = "InspectionDate", HeaderText = "Inspection Date", Type = UiColumnType.Date, Width = 180, Format = "M/d/yyyy", TextAlign = UiTextAlign.Center },
new UiGridColumn { Field = "InspectionStatus", HeaderText = "Inspection Status", Width = 180, TextAlign = UiTextAlign.Center },
new UiGridColumn { Field = "PunchListStatus", HeaderText = "Punch List Status", Width = 150, TextAlign = UiTextAlign.Center }
}
},
new UiGridColumn
{
HeaderText = "Personnel", TextAlign = UiTextAlign.Center, Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "Supervisor", HeaderText = "Supervisor", Width = 180 },
new UiGridColumn { Field = "Team", HeaderText = "Crew", Width = 200 }
}
},
new UiGridColumn
{
HeaderText = "Materials", TextAlign = UiTextAlign.Center, Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "MaterialUsed", HeaderText = "Material Used", Width = 180, TextAlign = UiTextAlign.Center },
new UiGridColumn { Field = "MaterialCost", HeaderText = "Material Cost", Width = 140, TextAlign = UiTextAlign.Center }
}
},
new UiGridColumn
{
HeaderText = "Cost Summary", TextAlign = UiTextAlign.Center, Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "TotalBudget", HeaderText = "Planned Budget", Type = UiColumnType.Number, Width = 140, Format = "C2", TextAlign = UiTextAlign.Center },
new UiGridColumn { Field = "PaidToDate", HeaderText = "Actual Spend", Type = UiColumnType.Number, Width = 140, Format = "C2", TextAlign = UiTextAlign.Center }
}
}
}
})
<script>
window.TreeSpan = (function () {
'use strict';
/**
* OnQueryCellInfo: a leaf task's Duration covers the leaf tasks right after it with the same duration and the same
* parent (siblings next to each other in the view).
*/
function cell(args) {
if (args.column !== 'Duration') { return; }
var grid = window.Lumen.get('spanTree');
var rows = grid.getCurrentViewRecords();
// The rows of the view by their key (each call gives the rows anew).
var at = -1;
for (var k = 0; k < rows.length; k++) {
if (rows[k].TaskId === args.data.TaskId) { at = k; break; }
}
if (at < 0 || isLeaf(grid, args.data) === false) { return; }
var parent = grid.getParent(args.data.TaskId);
var previous = rows[at - 1];
if (previous && grid.getParent(previous.TaskId) === parent && previous.Duration === args.data.Duration && isLeaf(grid, previous)) { return; }
var span = 1;
for (var i = at + 1; i < rows.length; i++) {
var next = rows[i];
if (grid.getParent(next.TaskId) !== parent || next.Duration !== args.data.Duration || !isLeaf(grid, next)) { break; }
span++;
}
if (span > 1) { args.rowSpan = span; }
}
function isLeaf(grid, row) {
return grid.getChildren(row.TaskId).length === 0;
}
return { cell: cell };
})();
</script>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using Lumen.UI.Mvc;
namespace YourApp.Controllers
{
public class TreeGridController : Controller
{
// The page is Views/TreeGrid/RowSpanningApi.cshtml; it draws what ViewData holds.
public ActionResult RowSpanningApi()
{
var rowSpanData = RowSpanItem.GetRowSpanData();
ViewData["datasource"] = rowSpanData;
return View();
}
public class RowSpanItem
{
public string ActivityName { get; set; }
public string LevelId { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public string Supervisor { get; set; }
public string Team { get; set; }
public string Status { get; set; }
public int Progress { get; set; }
public decimal TotalBudget { get; set; }
public decimal PaidToDate { get; set; }
public string Currency { get; set; }
public string CostCode { get; set; }
public string PermitStatus { get; set; }
public DateTime InspectionDate { get; set; }
public string InspectionStatus { get; set; }
public string FollowUpActions { get; set; }
public decimal InspectionCost { get; set; }
public string PunchListStatus { get; set; }
public string DocumentReference { get; set; }
public string MaterialUsed { get; set; }
public decimal MaterialCost { get; set; }
public string MaterialStockRemaining { get; set; }
public List<RowSpanItem> Children { get; set; }
public RowSpanItem() { Children = new List<RowSpanItem>(); }
public static List<RowSpanItem> GetRowSpanData()
{
return new List<RowSpanItem>
{
new RowSpanItem
{
ActivityName = "Tower",
LevelId = "L1-001",
StartDate = new DateTime(2025, 07, 01),
EndDate = new DateTime(2025, 12, 29),
Supervisor = "John Carter",
Team = "Executive Oversight",
Status = "Active",
Progress = 70,
TotalBudget = 1500000m,
PaidToDate = 1050000m,
Currency = "USD",
CostCode = "01-00-00",
PermitStatus = "Approved",
InspectionDate = new DateTime(2025, 12, 30),
InspectionStatus = "Active",
FollowUpActions = "Monitor progress",
InspectionCost = 600m,
PunchListStatus = "Open",
DocumentReference = "DOC-TWR-OVR",
MaterialUsed = "Project Planning Kits",
MaterialCost = 75000m,
MaterialStockRemaining = "N/A",
Children = new List<RowSpanItem>
{
new RowSpanItem
{
ActivityName = "Design Stage",
LevelId = "L2-001",
StartDate = new DateTime(2025, 07, 01),
EndDate = new DateTime(2025, 08, 15),
Supervisor = "Ethan Park",
Team = "Design Division",
Status = "Completed",
Progress = 100,
TotalBudget = 305000m,
PaidToDate = 350000m,
Currency = "USD",
CostCode = "02-01-00",
PermitStatus = "Issued",
InspectionDate = new DateTime(2025, 08, 16),
InspectionStatus = "Passed",
FollowUpActions = "None",
InspectionCost = 200m,
PunchListStatus = "Cleared",
DocumentReference = "DOC-TWR-DES-STG",
MaterialUsed = "Design Blueprints",
MaterialCost = 50000m,
MaterialStockRemaining = "N/A",
Children = new List<RowSpanItem>
{
new RowSpanItem { ActivityName = "Architectural Design Task", LevelId = "L3-001", StartDate = new DateTime(2025,07,02), EndDate = new DateTime(2025,07,10), InspectionDate = new DateTime(2025,07,11), Status = "Scheduled", Progress = 100, TotalBudget = 100000m, PaidToDate = 0m, Supervisor = "David Lin", Team = "Architecture Unit", PermitStatus = "Scheduled", InspectionStatus = "Passed", FollowUpActions = "None", InspectionCost = 100m, PunchListStatus = "Cleared", DocumentReference = "DOC-TWR-ARC-TSK", MaterialUsed = "CAD Drawings", MaterialCost = 15000m, MaterialStockRemaining = "N/A" },
new RowSpanItem { ActivityName = "Structural Design Task", LevelId = "L3-002", StartDate = new DateTime(2025,07,11), EndDate = new DateTime(2025,07,25), InspectionDate = new DateTime(2025,07,26), Status = "Scheduled", Progress = 100, TotalBudget = 120000m, PaidToDate = 0m, Supervisor = "Sarah Patel", Team = "Structural Unit", PermitStatus = "Scheduled", InspectionStatus = "Passed", FollowUpActions = "None", InspectionCost = 100m, PunchListStatus = "Cleared", DocumentReference = "DOC-TWR-STR-TSK", MaterialUsed = "Structural Plans", MaterialCost = 15000m, MaterialStockRemaining = "N/A" },
new RowSpanItem { ActivityName = "MEP Design Task", LevelId = "L3-003", StartDate = new DateTime(2025,07,26), EndDate = new DateTime(2025,08,15), InspectionDate = new DateTime(2025,08,16), Status = "Scheduled", Progress = 100, TotalBudget = 100000m, PaidToDate = 0m, Supervisor = "Carlos Rivera", Team = "MEP Unit", PermitStatus = "Scheduled", InspectionStatus = "Passed", FollowUpActions = "None", InspectionCost = 100m, PunchListStatus = "Cleared", DocumentReference = "DOC-TWR-MEP-TSK", MaterialUsed = "Electrical Schematics", MaterialCost = 20000m, MaterialStockRemaining = "N/A" }
}
},
new RowSpanItem
{
ActivityName = "Construction Stage",
LevelId = "L2-002",
StartDate = new DateTime(2025, 08, 16),
EndDate = new DateTime(2025, 10, 20),
Supervisor = "James Patel",
Team = "Construction Division",
Status = "In Progress",
Progress = 75,
TotalBudget = 900000m,
PaidToDate = 675000m,
Currency = "USD",
CostCode = "03-01-00",
PermitStatus = "Issued",
InspectionDate = new DateTime(2025, 10, 21),
InspectionStatus = "Passed with Notes",
FollowUpActions = "Reinforce structure",
InspectionCost = 300m,
PunchListStatus = "Open",
DocumentReference = "DOC-TWR-CON-STG",
MaterialUsed = "Construction Materials",
MaterialCost = 50000m,
MaterialStockRemaining = "300 tons",
Children = new List<RowSpanItem>
{
new RowSpanItem { ActivityName = "Foundation Construction Task", LevelId = "L3-004", StartDate = new DateTime(2025,08,16), EndDate = new DateTime(2025,08,25), InspectionDate = new DateTime(2025,08,26), Status = "Completed", Progress = 100, TotalBudget = 305000m, PaidToDate = 350000m, Supervisor = "Robert Singh", Team = "Foundation Crew", PermitStatus = "Approved", InspectionStatus = "Passed", FollowUpActions = "None", InspectionCost = 100m, PunchListStatus = "Cleared", DocumentReference = "DOC-TWR-FND-TSK", MaterialUsed = "Concrete", MaterialCost = 15000m, MaterialStockRemaining = "N/A" },
new RowSpanItem { ActivityName = "Structural Construction Task", LevelId = "L3-005", StartDate = new DateTime(2025,08,26), EndDate = new DateTime(2025,09,20), InspectionDate = new DateTime(2025,09,21), Status = "In Progress", Progress = 80, TotalBudget = 300000m, PaidToDate = 240000m, Supervisor = "Nathan Blake", Team = "Structural Team", PermitStatus = "Approved", InspectionStatus = "Passed with Notes", FollowUpActions = "Reinforce beams", InspectionCost = 100m, PunchListStatus = "Open", DocumentReference = "DOC-TWR-STR-TSK", MaterialUsed = "Steel Beams", MaterialCost = 20000m, MaterialStockRemaining = "200 tons" },
new RowSpanItem { ActivityName = "Exterior Construction Task", LevelId = "L3-006", StartDate = new DateTime(2025,09,21), EndDate = new DateTime(2025,10,20), InspectionDate = new DateTime(2025,10,21), Status = "In Progress", Progress = 40, TotalBudget = 300000m, PaidToDate = 120000m, Supervisor = "Thomas Reed", Team = "Exterior Crew", PermitStatus = "Approved", InspectionStatus = "Passed with Notes", FollowUpActions = "Continue exterior work", InspectionCost = 100m, PunchListStatus = "Open", DocumentReference = "DOC-TWR-EXT-TSK", MaterialUsed = "Metal Panels", MaterialCost = 15000m, MaterialStockRemaining = "300 panels" }
}
},
new RowSpanItem
{
ActivityName = "Safety Stage",
LevelId = "L2-003",
StartDate = new DateTime(2025, 10, 21),
EndDate = new DateTime(2025, 11, 05),
Supervisor = "Nathan Blake",
Team = "Safety Division",
Status = "In Progress",
Progress = 60,
TotalBudget = 50000m,
PaidToDate = 30000m,
Currency = "USD",
CostCode = "04-01-00",
PermitStatus = "Issued",
InspectionDate = new DateTime(2025, 11, 06),
InspectionStatus = "Scheduled",
FollowUpActions = "Complete safety audit",
InspectionCost = 0m,
PunchListStatus = "Open",
DocumentReference = "DOC-TWR-SAF-STG",
MaterialUsed = "Safety Equipment",
MaterialCost = 10000m,
MaterialStockRemaining = "50 units",
Children = new List<RowSpanItem>
{
new RowSpanItem { ActivityName = "OSHA Compliance Task", LevelId = "L3-007", StartDate = new DateTime(2025,10,21), EndDate = new DateTime(2025,10,27), InspectionDate = new DateTime(2025,10,28), Status = "In Progress", Progress = 70, TotalBudget = 20000m, PaidToDate = 14000m, Supervisor = "Laura Bennett", Team = "Safety Inspectors", PermitStatus = "Issued", InspectionStatus = "In Progress", FollowUpActions = "Complete briefing", InspectionCost = 0m, PunchListStatus = "Open", DocumentReference = "DOC-TWR-OSHA-TSK", MaterialUsed = "Safety Gear", MaterialCost = 4000m, MaterialStockRemaining = "40 helmets" },
new RowSpanItem { ActivityName = "Fire Safety Task", LevelId = "L3-008", StartDate = new DateTime(2025,10,28), EndDate = new DateTime(2025,11,01), InspectionDate = new DateTime(2025,11,02), Status = "Scheduled", Progress = 30, TotalBudget = 15000m, PaidToDate = 0m, Supervisor = "Melissa Tran", Team = "Fire Safety Team", PermitStatus = "Issued", InspectionStatus = "Scheduled", FollowUpActions = "Install exits", InspectionCost = 0m, PunchListStatus = "Open", DocumentReference = "DOC-TWR-FIRE-TSK", MaterialUsed = "Extinguishers", MaterialCost = 3000m, MaterialStockRemaining = "15 units" },
new RowSpanItem { ActivityName = "Structural Audit Task", LevelId = "L3-009", StartDate = new DateTime(2025,11,02), EndDate = new DateTime(2025,11,05), InspectionDate = new DateTime(2025,11,06), Status = "Scheduled", Progress = 20, TotalBudget = 15000m, PaidToDate = 0m, Supervisor = "David Lin", Team = "Audit Engineers", PermitStatus = "Issued", InspectionStatus = "Scheduled", FollowUpActions = "Verify integrity", InspectionCost = 0m, PunchListStatus = "Open", DocumentReference = "DOC-TWR-AUD-TSK", MaterialUsed = "Inspection Tools", MaterialCost = 3000m, MaterialStockRemaining = "N/A" }
}
},
new RowSpanItem
{
ActivityName = "Finishing Stage",
LevelId = "L2-004",
StartDate = new DateTime(2025, 11, 06),
EndDate = new DateTime(2025, 12, 10),
Supervisor = "Melissa Tran",
Team = "Finishing Division",
Status = "Planning",
Progress = 30,
TotalBudget = 250000m,
PaidToDate = 75000m,
Currency = "USD",
CostCode = "05-01-00",
PermitStatus = "Under Review",
InspectionDate = new DateTime(2025, 12, 11),
InspectionStatus = "Scheduled",
FollowUpActions = "Begin interior work",
InspectionCost = 0m,
PunchListStatus = "Pending",
DocumentReference = "DOC-TWR-FIN-STG",
MaterialUsed = "Finishing Supplies",
MaterialCost = 25000m,
MaterialStockRemaining = "200 units",
Children = new List<RowSpanItem>
{
new RowSpanItem { ActivityName = "Interior Drywall Task", LevelId = "L3-010", StartDate = new DateTime(2025,11,06), EndDate = new DateTime(2025,11,20), InspectionDate = new DateTime(2025,11,21), Status = "In Progress", Progress = 50, TotalBudget = 80000m, PaidToDate = 40000m, Supervisor = "Hannah Kim", Team = "Drywall Crew", PermitStatus = "Issued", InspectionStatus = "In Progress", FollowUpActions = "Check alignment", InspectionCost = 0m, PunchListStatus = "Open", DocumentReference = "DOC-TWR-DRY-TSK", MaterialUsed = "Drywall Sheets", MaterialCost = 8000m, MaterialStockRemaining = "150 panels" },
new RowSpanItem { ActivityName = "Flooring Installation Task", LevelId = "L3-011", StartDate = new DateTime(2025,11,21), EndDate = new DateTime(2025,12,01), InspectionDate = new DateTime(2025,12,02), Status = "Scheduled", Progress = 10, TotalBudget = 80000m, PaidToDate = 0m, Supervisor = "Sarah Patel", Team = "Flooring Team", PermitStatus = "Issued", InspectionStatus = "Scheduled", FollowUpActions = "Verify level", InspectionCost = 0m, PunchListStatus = "Open", DocumentReference = "DOC-TWR-FLR-TSM", MaterialUsed = "Concrete Flooring", MaterialCost = 10000m, MaterialStockRemaining = "200 bags" },
new RowSpanItem { ActivityName = "Fixture Setup Task", LevelId = "L3-012", StartDate = new DateTime(2025,12,02), EndDate = new DateTime(2025,12,10), InspectionDate = new DateTime(2025,12,11), Status = "Scheduled", Progress = 10, TotalBudget = 90000m, PaidToDate = 0m, Supervisor = "Lucas Nguyen", Team = "Fit-Out Crew", PermitStatus = "Issued", InspectionStatus = "Scheduled", FollowUpActions = "Install fixtures", InspectionCost = 0m, PunchListStatus = "Open", DocumentReference = "DOC-TWR-FIX-TSK", MaterialUsed = "Lighting Fixtures", MaterialCost = 7000m, MaterialStockRemaining = "50 units" }
}
},
new RowSpanItem
{
ActivityName = "Closeout Stage",
LevelId = "L2-005",
StartDate = new DateTime(2025, 12, 11),
EndDate = new DateTime(2025, 12, 29),
Supervisor = "Emma Wilson",
Team = "Closeout Division",
Status = "Planning",
Progress = 20,
TotalBudget = 50000m,
PaidToDate = 10000m,
Currency = "USD",
CostCode = "06-01-00",
PermitStatus = "Under Review",
InspectionDate = new DateTime(2025, 12, 30),
InspectionStatus = "Scheduled",
FollowUpActions = "Finalize handover",
InspectionCost = 0m,
PunchListStatus = "Open",
DocumentReference = "DOC-TWR-CLO-STG",
MaterialUsed = "Closeout Documents",
MaterialCost = 5000m,
MaterialStockRemaining = "N/A",
Children = new List<RowSpanItem>
{
new RowSpanItem { ActivityName = "Punch List Review Task", LevelId = "L3-013", StartDate = new DateTime(2025,12,11), EndDate = new DateTime(2025,12,15), InspectionDate = new DateTime(2025,12,16), Status = "Scheduled", Progress = 20, TotalBudget = 15000m, PaidToDate = 0m, Supervisor = "John Carter", Team = "Closeout Team", PermitStatus = "Scheduled", InspectionStatus = "Not Started", FollowUpActions = "Resolve issues", InspectionCost = 0m, PunchListStatus = "Pending", DocumentReference = "DOC-TWR-PLR-TSK", MaterialUsed = "Punch List Forms", MaterialCost = 2000m, MaterialStockRemaining = "N/A" },
new RowSpanItem { ActivityName = "Final Documentation Task", LevelId = "L3-014", StartDate = new DateTime(2025,12,16), EndDate = new DateTime(2025,12,22), InspectionDate = new DateTime(2025,12,23), Status = "Scheduled", Progress = 20, TotalBudget = 15000m, PaidToDate = 0m, Supervisor = "Emily Foster", Team = "Documentation Team", PermitStatus = "Scheduled", InspectionStatus = "Not Started", FollowUpActions = "Prepare reports", InspectionCost = 0m, PunchListStatus = "Pending", DocumentReference = "DOC-TWR-FD-TSK", MaterialUsed = "As-Built Drawings", MaterialCost = 2000m, MaterialStockRemaining = "N/A" },
new RowSpanItem { ActivityName = "Client Handover Task", LevelId = "L3-015", StartDate = new DateTime(2025,12,23), EndDate = new DateTime(2025,12,29), InspectionDate = new DateTime(2025,12,30), Status = "Scheduled", Progress = 20, TotalBudget = 20000m, PaidToDate = 0m, Supervisor = "Emma Wilson", Team = "Client Relations", PermitStatus = "Scheduled", InspectionStatus = "Not Started", FollowUpActions = "Conduct walkthrough", InspectionCost = 0m, PunchListStatus = "Pending", DocumentReference = "DOC-TWR-CH-TSK", MaterialUsed = "Handover Kits", MaterialCost = 1000m, MaterialStockRemaining = "Delivered" }
}
}
}
},
new RowSpanItem
{
ActivityName = "Warehouse",
LevelId = "L1-004",
StartDate = new DateTime(2025, 08, 01),
EndDate = new DateTime(2025, 12, 28),
Supervisor = "Emma Wilson",
Team = "Executive Oversight",
Status = "Active",
Progress = 55,
TotalBudget = 1030000m,
PaidToDate = 566500m,
Currency = "USD",
CostCode = "01-00-00",
PermitStatus = "Approved",
InspectionDate = new DateTime(2025, 12, 29),
InspectionStatus = "Passed with Notes",
FollowUpActions = "Address structural concerns",
InspectionCost = 400m,
PunchListStatus = "Open",
DocumentReference = "DOC-WH-OVR",
MaterialUsed = "Project Planning Kits",
MaterialCost = 50000m,
MaterialStockRemaining = "N/A",
Children = new List<RowSpanItem>
{
new RowSpanItem
{
ActivityName = "Design Stage",
LevelId = "L2-016",
StartDate = new DateTime(2025, 08, 01),
EndDate = new DateTime(2025, 09, 10),
Supervisor = "Ethan Park",
Team = "Design Division",
Status = "Completed",
Progress = 100,
TotalBudget = 202000m,
PaidToDate = 220000m,
Currency = "USD",
CostCode = "02-01-00",
PermitStatus = "Issued",
InspectionDate = new DateTime(2025, 09, 11),
InspectionStatus = "Passed",
FollowUpActions = "None",
InspectionCost = 300m,
PunchListStatus = "Cleared",
DocumentReference = "DOC-WH-DES-STG",
MaterialUsed = "Design Blueprints",
MaterialCost = 30000m,
MaterialStockRemaining = "N/A",
Children = new List<RowSpanItem>
{
new RowSpanItem { ActivityName = "Architectural Design Task", LevelId = "L3-046", StartDate = new DateTime(2025,08,02), EndDate = new DateTime(2025,08,12), InspectionDate = new DateTime(2025,08,13), Status = "Completed", Progress = 100, TotalBudget = 70000m, PaidToDate = 70200m, Supervisor = "David Lin", Team = "Architecture Unit", PermitStatus = "Approved", InspectionStatus = "Passed", FollowUpActions = "None", InspectionCost = 100m, PunchListStatus = "Cleared", DocumentReference = "DOC-WH-ARC-TSK", MaterialUsed = "CAD Drawings", MaterialCost = 10000m, MaterialStockRemaining = "N/A" },
new RowSpanItem { ActivityName = "Structural Design Task", LevelId = "L3-047", StartDate = new DateTime(2025,08,13), EndDate = new DateTime(2025,08,28), InspectionDate = new DateTime(2025,08,29), Status = "Completed", Progress = 100, TotalBudget = 72000m, PaidToDate = 70000m, Supervisor = "Sarah Patel", Team = "Structural Unit", PermitStatus = "Approved", InspectionStatus = "Passed", FollowUpActions = "None", InspectionCost = 100m, PunchListStatus = "Cleared", DocumentReference = "DOC-WH-STR-TSK", MaterialUsed = "Structural Plans", MaterialCost = 10000m, MaterialStockRemaining = "N/A" },
new RowSpanItem { ActivityName = "MEP Design Task", LevelId = "L3-048", StartDate = new DateTime(2025,08,29), EndDate = new DateTime(2025,09,10), InspectionDate = new DateTime(2025,09,11), Status = "Completed", Progress = 100, TotalBudget = 62000m, PaidToDate = 60000m, Supervisor = "Carlos Rivera", Team = "MEP Unit", PermitStatus = "Approved", InspectionStatus = "Passed", FollowUpActions = "None", InspectionCost = 100m, PunchListStatus = "Cleared", DocumentReference = "DOC-WH-MEP-TSK", MaterialUsed = "Electrical Schematics", MaterialCost = 10000m, MaterialStockRemaining = "N/A" }
}
},
new RowSpanItem
{
ActivityName = "Construction Stage",
LevelId = "L2-017",
StartDate = new DateTime(2025, 09, 11),
EndDate = new DateTime(2025, 11, 20),
Supervisor = "James Patel",
Team = "Construction Division",
Status = "In Progress",
Progress = 52,
TotalBudget = 800000m,
PaidToDate = 400000m,
Currency = "USD",
CostCode = "03-01-00",
PermitStatus = "Issued",
InspectionDate = new DateTime(2025, 11, 21),
InspectionStatus = "Passed with Notes",
FollowUpActions = "Address structural issues",
InspectionCost = 400m,
PunchListStatus = "Open",
DocumentReference = "DOC-WH-CON-STG",
MaterialUsed = "Construction Materials",
MaterialCost = 200000m,
MaterialStockRemaining = "500 tons",
Children = new List<RowSpanItem>
{
new RowSpanItem { ActivityName = "Foundation Construction Task", LevelId = "L3-049", StartDate = new DateTime(2025,09,11), EndDate = new DateTime(2025,09,25), InspectionDate = new DateTime(2025,09,26), Status = "Completed", Progress = 100, TotalBudget = 300000m, PaidToDate = 320000m, Supervisor = "Robert Singh", Team = "Foundation Crew", PermitStatus = "Approved", InspectionStatus = "Passed", FollowUpActions = "None", InspectionCost = 100m, PunchListStatus = "Cleared", DocumentReference = "DOC-WH-FND-TSK", MaterialUsed = "Concrete Mix", MaterialCost = 80000m, MaterialStockRemaining = "N/A" },
new RowSpanItem { ActivityName = "Framing Construction Task", LevelId = "L3-050", StartDate = new DateTime(2025,09,26), EndDate = new DateTime(2025,10,25), InspectionDate = new DateTime(2025,10,26), Status = "In Progress", Progress = 60, TotalBudget = 300000m, PaidToDate = 180000m, Supervisor = "Angela Moore", Team = "Structural Crew", PermitStatus = "Approved", InspectionStatus = "Passed with Notes", FollowUpActions = "Continue framing", InspectionCost = 200m, PunchListStatus = "Open", DocumentReference = "DOC-WH-FRM-TSK", MaterialUsed = "Steel Beams", MaterialCost = 60000m, MaterialStockRemaining = "200 tons" },
new RowSpanItem { ActivityName = "Exterior Construction Task", LevelId = "L3-051", StartDate = new DateTime(2025,10,26), EndDate = new DateTime(2025,11,20), InspectionDate = new DateTime(2025,11,21), Status = "In Progress", Progress = 20, TotalBudget = 200000m, PaidToDate = 40000m, Supervisor = "Thomas Reed", Team = "Exterior Crew", PermitStatus = "Issued", InspectionStatus = "In Progress", FollowUpActions = "Continue exterior work", InspectionCost = 0m, PunchListStatus = "Open", DocumentReference = "DOC-WH-EXT-TSK", MaterialUsed = "Metal Panels", MaterialCost = 60000m, MaterialStockRemaining = "300 panels" }
}
},
new RowSpanItem
{
ActivityName = "Safety Stage",
LevelId = "L2-018",
StartDate = new DateTime(2025, 11, 21),
EndDate = new DateTime(2025, 12, 10),
Supervisor = "Nathan Blake",
Team = "Safety Division",
Status = "Planning",
Progress = 30,
TotalBudget = 30000m,
PaidToDate = 9000m,
Currency = "USD",
CostCode = "04-01-00",
PermitStatus = "Under Review",
InspectionDate = new DateTime(2025, 12, 11),
InspectionStatus = "Scheduled",
FollowUpActions = "Schedule safety audit",
InspectionCost = 0m,
PunchListStatus = "Scheduled",
DocumentReference = "DOC-WH-SAF-STG",
MaterialUsed = "Safety Equipment",
MaterialCost = 5000m,
MaterialStockRemaining = "50 units",
Children = new List<RowSpanItem>
{
new RowSpanItem { ActivityName = "OSHA Compliance Task", LevelId = "L3-052", StartDate = new DateTime(2025,11,21), EndDate = new DateTime(2025,11,28), InspectionDate = new DateTime(2025,11,29), Status = "Scheduled", Progress = 30, TotalBudget = 10000m, PaidToDate = 0m, Supervisor = "Laura Bennett", Team = "Safety Inspectors", PermitStatus = "Scheduled", InspectionStatus = "Not Started", FollowUpActions = "Conduct briefing", InspectionCost = 0m, PunchListStatus = "Not Started", DocumentReference = "DOC-WH-OSHA-TSK", MaterialUsed = "Safety Gear", MaterialCost = 2000m, MaterialStockRemaining = "40 helmets" },
new RowSpanItem { ActivityName = "Fire Safety Task", LevelId = "L3-053", StartDate = new DateTime(2025,11,29), EndDate = new DateTime(2025,12,05), InspectionDate = new DateTime(2025,12,06), Status = "Scheduled", Progress = 20, TotalBudget = 10000m, PaidToDate = 0m, Supervisor = "Melissa Tran", Team = "Fire Safety Team", PermitStatus = "Scheduled", InspectionStatus = "Not Started", FollowUpActions = "Install exits", InspectionCost = 0m, PunchListStatus = "Not Started", DocumentReference = "DOC-WH-FIRE-TSK", MaterialUsed = "Extinguishers", MaterialCost = 1500m, MaterialStockRemaining = "15 units" },
new RowSpanItem { ActivityName = "Structural Audit Task", LevelId = "L3-054", StartDate = new DateTime(2025,12,06), EndDate = new DateTime(2025,12,10), InspectionDate = new DateTime(2025,12,11), Status = "Scheduled", Progress = 20, TotalBudget = 10000m, PaidToDate = 0m, Supervisor = "David Lin", Team = "Audit Engineers", PermitStatus = "Scheduled", InspectionStatus = "Not Started", FollowUpActions = "Verify integrity", InspectionCost = 0m, PunchListStatus = "Not Started", DocumentReference = "DOC-WH-AUD-TSK", MaterialUsed = "Inspection Tools", MaterialCost = 1500m, MaterialStockRemaining = "N/A" }
}
}
}
}
};
}
}
}
}
@* Install once: Install-Package Lumen.UI.Mvc (or: dotnet add package Lumen.UI.Mvc) *@
@* Views/Web.config: <add namespace="Lumen.UI.Mvc" /> *@
@* Views/Shared/_Layout.cshtml *@
<head>
@Html.UiStyles()
<link rel="stylesheet" href="~/Content/site.css" />
</head>
<body>
@RenderBody()
@Html.UiScripts()
@RenderSection("scripts", required: false)
</body>