Example of Virtual Scrolling in ASP.NET MVC Tree Grid Control
This sample demonstrates row virtualization in the TreeGrid component, enabling smooth scrolling and efficient rendering of large sets of self-referencing records with full CRUD support and custom cell templates.
${Status}
${Region}
${Environment}
${ComplianceScore}
${Priority}
@Html.UiTreeGrid(new UiTreeGridOptions
{
Id = "TreeGridVirtualScroll",
OnActionBegin = "actionBegin",
Data = ViewData["datasource"],
EnableVirtualization = true,
Height = "400px",
RowHeight = 50,
TreeColumnIndex = 2,
IdMapping = "TaskID",
ParentIdMapping = "ParentID",
AllowPaging = false,
EditSettings = new UiEditSettings { AllowAdding = true, AllowDeleting = true, AllowEditing = true, Mode = UiEditMode.Normal, NewRowPosition = UiNewRowPosition.Child },
Selection = UiGridSelection.Single,
Toolbar = new List<string> { "Add", "Edit", "Delete", "Update", "Cancel", "Indent", "Outdent" },
Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "TaskID", HeaderText = "ID", Type = UiColumnType.Number, TextAlign = UiTextAlign.Right, Width = 90, IsPrimaryKey = true, Visible = false },
new UiGridColumn { Field = "ParentID", HeaderText = "Parent ID", Type = UiColumnType.Number, TextAlign = UiTextAlign.Right, Width = 90, Visible = false },
new UiGridColumn { Field = "ResourceId", HeaderText = "Resource", Width = 360, ValidationRules = new UiValidationRules { Required = true } },
new UiGridColumn { Field = "Type", HeaderText = "Type", Width = 120, EditType = UiEditType.DropDownEdit },
new UiGridColumn { Field = "Status", HeaderText = "Status", Width = 130, TextAlign = UiTextAlign.Center, Template = "#statusTemplate", EditType = UiEditType.DropDownEdit, ValidationRules = new UiValidationRules { Required = true } },
new UiGridColumn { Field = "Region", HeaderText = "Region", Width = 150, Template = "#regionTemplate", EditType = UiEditType.DropDownEdit },
new UiGridColumn { Field = "Environment", HeaderText = "Environment", Width = 140, Template = "#environmentTemplate", TextAlign = UiTextAlign.Left, EditType = UiEditType.DropDownEdit, ValidationRules = new UiValidationRules { Required = true } },
new UiGridColumn { Field = "MonthlyCost", HeaderText = "Monthly Cost ($)", Type = UiColumnType.Number, Width = 130, TextAlign = UiTextAlign.Right, Format = "C0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "Cpu", HeaderText = "CPU (%)", Type = UiColumnType.Number, Width = 130, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "Memory", HeaderText = "Memory (%)", Type = UiColumnType.Number, Width = 110, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "Disk", HeaderText = "Disk (%)", Type = UiColumnType.Number, Width = 120, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "NetworkMbps", HeaderText = "Network (mbps)", Type = UiColumnType.Number, Width = 150, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "RequestsPerSec", HeaderText = "Requests (per sec)", Type = UiColumnType.Number, Width = 150, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "ErrorRatePpm", HeaderText = "Error Rate (ppm)", Type = UiColumnType.Number, Width = 170, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "SecurityFindings", HeaderText = "Security Errors", Type = UiColumnType.Number, Width = 140, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "StorageGb", HeaderText = "Storage (GB)", Type = UiColumnType.Number, Width = 140, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "InstanceCount", HeaderText = "Instances", Type = UiColumnType.Number, Width = 140, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "UptimeDays", HeaderText = "Uptime (days)", Type = UiColumnType.Number, Width = 150, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "Priority", HeaderText = "Priority", Width = 120, TextAlign = UiTextAlign.Center, Template = "#priorityTemplate", EditType = UiEditType.DropDownEdit, ValidationRules = new UiValidationRules { Required = true } },
new UiGridColumn { Field = "ComplianceScore", HeaderText = "Compliance Score", Type = UiColumnType.Number, Width = 180, TextAlign = UiTextAlign.Left, Template = "#complianceTemplate", EditType = UiEditType.NumericEdit }
}
})
<style>
.rg-badge {
padding: 4px 8px;
border-radius: 4px;
text-align: center;
font-size: 12px;
font-weight: 500;
width: 100px;
line-height: 2;
}
.rg-badge-status[data-status="Running"] {
background: #66bb6a;
color: white;
}
.rg-badge-status[data-status="Stopped"] {
background: #ef5350;
color: white;
}
.rg-badge-status[data-status="Degraded"] {
background: #ffb74d;
color: white;
}
.rg-badge-status[data-status="Maintenance"] {
background: #0277bd;
color: white;
}
.rg-badge-priority[data-priority="Low"] {
background-color: #ccffcc;
color: #00cc00;
}
.rg-badge-priority[data-priority="High"] {
background-color: #ffe5cc;
color: #cc6600;
}
.rg-badge-priority[data-priority="Critical"] {
background-color: #ffcccc;
color: #cc0000;
}
.rg-compliance {
width: 100px;
height: 12px;
background: #f3f4f6;
border-radius: 20px;
overflow: hidden;
}
.rg-compliance > i {
display: block;
height: 100%;
background: #2563eb;
border-radius: 20px;
}
.rg-compliance-wrapper {
display: flex;
gap: 10px;
align-items: center;
}
.rg-compliance-value {
color: #1e40af;
font-weight: 600;
}
.rg-region {
display: flex;
gap: 10px;
align-items: center;
}
.rg-region-flag {
display: inline-flex;
width: 20px;
height: 14px;
border-radius: 2px;
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
background-size: contain;
background-repeat: no-repeat;
background-position: center;
flex-shrink: 0;
}
.rg-region[data-region="West US"] .rg-region-flag,
.rg-region[data-region="East US"] .rg-region-flag {
background-image: url('data:image/svg+xml;utf8,<svg width="20" height="14" viewBox="0 0 20 14" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="14" fill="%23B22234"/><rect y="0" width="20" height="2" fill="%23fff"/><rect y="4" width="20" height="2" fill="%23fff"/><rect y="8" width="20" height="2" fill="%23fff"/><rect y="12" width="20" height="2" fill="%23fff"/><rect width="8" height="8" fill="%233C3B6E"/></svg>');
}
.rg-region[data-region="EU West"] .rg-region-flag,
.rg-region[data-region="EU Central"] .rg-region-flag {
background-image: url('data:image/svg+xml;utf8,<svg width="20" height="14" viewBox="0 0 20 14" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="14" fill="%23003399"/><circle cx="10" cy="7" r="2" fill="%23FFCC00"/><circle cx="13" cy="7" r="0.6" fill="%23FFCC00"/><circle cx="7" cy="7" r="0.6" fill="%23FFCC00"/><circle cx="10" cy="4" r="0.6" fill="%23FFCC00"/><circle cx="10" cy="10" r="0.6" fill="%23FFCC00"/></svg>');
}
.rg-region[data-region="Canada Central"] .rg-region-flag {
background-image: url('data:image/svg+xml;utf8,<svg width="20" height="14" viewBox="0 0 20 14" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="14" fill="%23fff"/><rect width="5" height="14" fill="%23FF0000"/><rect x="15" width="5" height="14" fill="%23FF0000"/><path d="M10,5 L10.5,7 L9,7.5 L10.5,8 L10,10 L11,8.5 L12,10 L11.5,8 L13,7.5 L11.5,7 L12,5 L11,6.5 Z" fill="%23FF0000"/></svg>');
}
.rg-region[data-region="Australia East"] .rg-region-flag {
background-image: url('data:image/svg+xml;utf8,<svg width="20" height="14" viewBox="0 0 20 14" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="14" fill="%23012169"/><rect width="8" height="6" fill="%23012169"/><path d="M0,0 L8,6 M8,0 L0,6" stroke="%23fff" stroke-width="1.2"/><path d="M4,0 L4,6 M0,3 L8,3" stroke="%23fff" stroke-width="2"/><path d="M4,0 L4,6 M0,3 L8,3" stroke="%23C8102E" stroke-width="1.2"/><circle cx="15" cy="10" r="1" fill="%23fff"/><circle cx="13" cy="8" r="0.8" fill="%23fff"/><circle cx="17" cy="8" r="0.8" fill="%23fff"/></svg>');
}
.rg-region[data-region="Asia Pacific"] .rg-region-flag {
background-image: url('data:image/svg+xml;utf8,<svg width="20" height="14" viewBox="0 0 20 14" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="14" fill="%23f97316"/><circle cx="10" cy="7" r="3" fill="%23fff"/><text x="10" y="10" font-size="6" text-anchor="middle" fill="%23f97316" font-weight="bold">AP</text></svg>');
}
.rg-region[data-region="South America"] .rg-region-flag {
background-image: url('data:image/svg+xml;utf8,<svg width="20" height="14" viewBox="0 0 20 14" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="14" fill="%23009739"/><path d="M10,1 L18,7 L10,13 L2,7 Z" fill="%23FEDD00"/><circle cx="10" cy="7" r="2.5" fill="%23002776"/></svg>');
}
.rg-region-flag {
background-image: url('data:image/svg+xml;utf8,<svg width="20" height="14" viewBox="0 0 20 14" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="14" fill="%236b7280" rx="2"/><circle cx="10" cy="7" r="4" fill="none" stroke="%23fff" stroke-width="0.8"/><path d="M10,3 Q12,7 10,11 M10,3 Q8,7 10,11 M6,7 L14,7" stroke="%23fff" stroke-width="0.8" fill="none"/></svg>');
}
.tailwind3-dark .rg-compliance-value,
.fluent2-dark .rg-compliance-value,
.bootstrap5\.3-dark .rg-compliance-value,
.material3-dark .rg-compliance-value,
.fluent2-highcontrast .rg-compliance-value {
color: #fff;
}
</style>
<template id="statusTemplate"><div class="rg-badge rg-badge-status" data-status="${Status}">
${Status}
</div></template>
<template id="regionTemplate"><div class="rg-region" data-region="${Region}">
<span class="rg-region-flag"></span>
<span class="rg-region-name">${Region}</span>
</div></template>
<template id="environmentTemplate"><div class="rg-badge rg-badge-env" data-env="${Environment}">
${Environment}
</div></template>
<template id="complianceTemplate"><div class="rg-compliance-wrapper">
<div class="rg-compliance">
<i style='width: ${ComplianceScore}%'></i>
</div>
<div class="rg-compliance-value">${ComplianceScore}</div>
</div></template>
<template id="priorityTemplate"><div class="rg-badge rg-badge-priority" data-priority="${Priority}">
${Priority}
</div></template>
@Html.UiTreeGrid(new UiTreeGridOptions
{
Id = "TreeGridVirtualScroll",
OnActionBegin = "actionBegin",
Data = ViewData["datasource"],
EnableVirtualization = true,
Height = "400px",
RowHeight = 50,
TreeColumnIndex = 2,
IdMapping = "TaskID",
ParentIdMapping = "ParentID",
AllowPaging = false,
EditSettings = new UiEditSettings { AllowAdding = true, AllowDeleting = true, AllowEditing = true, Mode = UiEditMode.Normal, NewRowPosition = UiNewRowPosition.Child },
Selection = UiGridSelection.Single,
Toolbar = new List<string> { "Add", "Edit", "Delete", "Update", "Cancel", "Indent", "Outdent" },
Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "TaskID", HeaderText = "ID", Type = UiColumnType.Number, TextAlign = UiTextAlign.Right, Width = 90, IsPrimaryKey = true, Visible = false },
new UiGridColumn { Field = "ParentID", HeaderText = "Parent ID", Type = UiColumnType.Number, TextAlign = UiTextAlign.Right, Width = 90, Visible = false },
new UiGridColumn { Field = "ResourceId", HeaderText = "Resource", Width = 360, ValidationRules = new UiValidationRules { Required = true } },
new UiGridColumn { Field = "Type", HeaderText = "Type", Width = 120, EditType = UiEditType.DropDownEdit },
new UiGridColumn { Field = "Status", HeaderText = "Status", Width = 130, TextAlign = UiTextAlign.Center, Template = "#statusTemplate", EditType = UiEditType.DropDownEdit, ValidationRules = new UiValidationRules { Required = true } },
new UiGridColumn { Field = "Region", HeaderText = "Region", Width = 150, Template = "#regionTemplate", EditType = UiEditType.DropDownEdit },
new UiGridColumn { Field = "Environment", HeaderText = "Environment", Width = 140, Template = "#environmentTemplate", TextAlign = UiTextAlign.Left, EditType = UiEditType.DropDownEdit, ValidationRules = new UiValidationRules { Required = true } },
new UiGridColumn { Field = "MonthlyCost", HeaderText = "Monthly Cost ($)", Type = UiColumnType.Number, Width = 130, TextAlign = UiTextAlign.Right, Format = "C0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "Cpu", HeaderText = "CPU (%)", Type = UiColumnType.Number, Width = 130, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "Memory", HeaderText = "Memory (%)", Type = UiColumnType.Number, Width = 110, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "Disk", HeaderText = "Disk (%)", Type = UiColumnType.Number, Width = 120, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "NetworkMbps", HeaderText = "Network (mbps)", Type = UiColumnType.Number, Width = 150, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "RequestsPerSec", HeaderText = "Requests (per sec)", Type = UiColumnType.Number, Width = 150, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "ErrorRatePpm", HeaderText = "Error Rate (ppm)", Type = UiColumnType.Number, Width = 170, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "SecurityFindings", HeaderText = "Security Errors", Type = UiColumnType.Number, Width = 140, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "StorageGb", HeaderText = "Storage (GB)", Type = UiColumnType.Number, Width = 140, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "InstanceCount", HeaderText = "Instances", Type = UiColumnType.Number, Width = 140, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "UptimeDays", HeaderText = "Uptime (days)", Type = UiColumnType.Number, Width = 150, TextAlign = UiTextAlign.Right, Format = "N0", EditType = UiEditType.NumericEdit },
new UiGridColumn { Field = "Priority", HeaderText = "Priority", Width = 120, TextAlign = UiTextAlign.Center, Template = "#priorityTemplate", EditType = UiEditType.DropDownEdit, ValidationRules = new UiValidationRules { Required = true } },
new UiGridColumn { Field = "ComplianceScore", HeaderText = "Compliance Score", Type = UiColumnType.Number, Width = 180, TextAlign = UiTextAlign.Left, Template = "#complianceTemplate", EditType = UiEditType.NumericEdit }
}
})
<script>
// A new row gets an id (10000 and up) when it is saved.
function actionBegin(args) {
if (args.requestType === 'save' && args.action !== 'edit') {
args.data.TaskID = 10000 + Math.floor(Math.random() * 10001);
}
}
</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/VirtualScrolling.cshtml; it draws what ViewData holds.
public ActionResult VirtualScrolling()
{
ViewData["datasource"] = VirtualScrollData.GetVirtualScrollData();
return View();
}
public class VirtualScrollData
{
public int TaskID { get; set; }
public int? ParentID { get; set; }
public string ResourceId { get; set; }
public string Type { get; set; }
public string Status { get; set; }
public string Region { get; set; }
public string Environment { get; set; }
public int MonthlyCost { get; set; }
public int Cpu { get; set; }
public int Memory { get; set; }
public int Disk { get; set; }
public int NetworkMbps { get; set; }
public int RequestsPerSec { get; set; }
public int ErrorRatePpm { get; set; }
public int StorageGb { get; set; }
public int InstanceCount { get; set; }
public int UptimeDays { get; set; }
public int TagsCount { get; set; }
public int ComplianceScore { get; set; }
public string Priority { get; set; }
public int SecurityFindings { get; set; }
public static List<VirtualScrollData> GetVirtualScrollData()
{
List<VirtualScrollData> DataCollection = new List<VirtualScrollData>();
string[] resourceNames = new string[] {
"Production West US - Resource Group", "Production East US - Resource Group", "Staging West US - Resource Group",
"Development East US - Resource Group", "Analytics EU West - Resource Group", "Security Global - Resource Group",
"Finance EU Central - Resource Group", "Marketing US East - Resource Group", "Sales Asia Pacific - Resource Group",
"Shared Core - Resource Group", "API Server 01", "API Server 02", "Web Server 01", "Web Server 02", "Batch Worker 01",
"ETL Worker 01", "ETL Worker 02", "Redis Cache 01", "Redis Cache 02", "Background Worker 01", "PostgreSQL Primary",
"PostgreSQL Replica", "MySQL Orders", "SQL Server BI", "MongoDB Catalog", "Redis Session Store", "Cosmos DB User Profile",
"Analytics Warehouse", "Time Series Metrics DB", "Secrets Vault", "Logs Archive Storage", "Daily Backups Storage",
"Images CDN Storage", "Data Lake Raw Zone", "Data Lake Curated Zone", "Temporary Scratch Storage", "CI Artifacts Storage",
"Shared Documents Storage", "Export Dumps Storage", "ML Models Storage", "Core Hub Virtual Network",
"Applications Spoke Virtual Network", "Data Spoke Virtual Network", "Frontend Subnet", "Backend Subnet",
"Data Services Subnet", "Frontend Network Security Group", "Backend Network Security Group", "Data Network Security Group",
"Perimeter Firewall", "Production Kubernetes Cluster", "Staging Kubernetes Cluster", "Analytics Kubernetes Cluster",
"System Node Pool", "General Node Pool", "GPU Node Pool", "Apps Namespace", "Operations Namespace", "Observability Namespace",
"Ingress Gateway", "Public Web Load Balancer", "Internal API Load Balancer", "Frontend Application Gateway",
"Backend Application Gateway", "Core API Gateway", "Service Mesh Gateway", "Edge Gateway", "Global Traffic Manager",
"Private Link Endpoint", "NAT Gateway", "Image Resize Function", "Data Transform Function", "Webhook Handler Function",
"Scheduled Cleanup Function", "ETL Trigger Function", "PDF Generator Function", "Notification Dispatcher Function",
"Thumbnail Generator Function", "CSV Import Function", "Anomaly Detector Function", "Web Portal Application",
"Admin Console Application", "Partner API Service", "Customer API Service", "Mobile Backend Service", "Campaign Service",
"Notification Service", "Payment Service", "Reporting Service", "Search Service", "Log Analytics Workspace",
"Metrics Workspace", "Alert Rules Collection", "Uptime Probes", "APM Insights", "Grafana Dashboard", "Prometheus Server",
"Trace Collector", "Synthetic Tests Suite", "SIEM Platform"
};
string[] resourceTypes = new string[] {
"Virtual Machine", "Database", "Storage", "Network", "Kubernetes", "Gateway", "Serverless", "Application", "Monitoring", "Security"
};
string[] regions = new string[] {
"West US", "East US", "EU West", "EU Central", "Asia Pacific", "South America", "Canada Central", "Australia East"
};
string[] statuses = new string[] { "Running", "Stopped", "Degraded", "Maintenance" };
string[] environments = new string[] { "Production", "Staging", "Development" };
string[] priorities = new string[] { "Low", "High", "Critical" };
Random rand = new Random(45);
int taskId = 1;
for (int p = 0; p < 20; p++)
{
int parentId = taskId;
string resourceType = resourceTypes[rand.Next(resourceTypes.Length)];
string region = regions[p % regions.Length];
string environment = environments[p % 3];
string status = statuses[(p + 1) % statuses.Length];
string priority = priorities[p % priorities.Length];
string parentResourceId = resourceNames[rand.Next(resourceNames.Length)];
DataCollection.Add(new VirtualScrollData
{
TaskID = taskId,
ParentID = null,
ResourceId = parentResourceId,
Type = resourceType,
Status = status,
Region = region,
Environment = environment,
MonthlyCost = 500 + (p * 150),
Cpu = 45 + (p % 50),
Memory = 65 + (p % 30),
Disk = 72 + (p % 25),
NetworkMbps = 100 + (p * 50),
RequestsPerSec = 1000 + (p * 500),
ErrorRatePpm = 100 + (p * 20),
StorageGb = 500 + (p * 100),
InstanceCount = 2 + (p % 8),
UptimeDays = 180 + (p * 5),
TagsCount = 3 + (p % 7),
ComplianceScore = 75 + (p % 25),
Priority = priority,
SecurityFindings = p % 10
});
taskId++;
int childrenPerParent = 25 + (p % 30);
for (int c = 0; c < childrenPerParent; c++)
{
string childStatus = statuses[(c + p) % statuses.Length];
string childEnvironment = environments[(c + p) % 3];
string childRegion = regions[(c + p + 2) % regions.Length];
string childresourceType = resourceTypes[rand.Next(resourceTypes.Length)];
string childResourceId = resourceNames[rand.Next(resourceNames.Length)];
DataCollection.Add(new VirtualScrollData
{
TaskID = taskId,
ParentID = parentId,
ResourceId = childResourceId,
Type = childresourceType,
Status = childStatus,
Region = childRegion,
Environment = childEnvironment,
MonthlyCost = 50 + (c * 5),
Cpu = rand.Next(10, 95),
Memory = rand.Next(15, 90),
Disk = rand.Next(20, 98),
NetworkMbps = 10 + (c % 100),
RequestsPerSec = 100 + (c * 50),
ErrorRatePpm = 10 + (c % 100),
StorageGb = 50 + (c * 10),
InstanceCount = 1,
UptimeDays = rand.Next(30, 365),
TagsCount = rand.Next(1, 15),
ComplianceScore = rand.Next(60, 100),
Priority = priorities[(c + p) % priorities.Length],
SecurityFindings = rand.Next(0, 20)
});
taskId++;
}
}
return DataCollection;
}
}
}
}
@* 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>