Example of Employee Management in ASP.NET MVC Tree Grid Control
This demo showcases the Syncfusion® Tree Grid. It presents comprehensive employee information customized for various viewer roles: HR, employee, help desk, and project management. The application uses a structured employee dataset with profiles, work modes, leave balances, and other relevant data.
@Html.UiTreeGrid(new UiTreeGridOptions
{
Id = "EmployeeTreeGrid",
Data = ViewBag.data1,
AllowSorting = true,
AllowFiltering = true,
FilterType = UiGridFilterType.Menu,
FilterHierarchyMode = UiTreeFilterMode.None,
Height = "400px",
GridLines = UiGridLines.Both,
ChildMapping = "Children",
TreeColumnIndex = 0,
AllowPaging = true,
PageSize = 10,
Selection = UiGridSelection.Single,
OnQueryCellInfo = "onQueryCellInfo",
Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "ID", HeaderText = "ID", Width = 200, TextAlign = UiTextAlign.Left },
new UiGridColumn { Field = "EmployeeName", HeaderText = "Name", HeaderTemplate = "#employeeHeaderTemplate", Width = 250 },
new UiGridColumn { Field = "Location", HeaderText = "Location", Width = 200 },
new UiGridColumn { Field = "JoinDate", HeaderText = "Date Joined", Type = UiColumnType.Date, Format = "M/d/yyyy", Width = 180, TextAlign = UiTextAlign.Right },
new UiGridColumn { Field = "Salary", HeaderText = "Salary Per Month", Type = UiColumnType.Number, Format = "C0", Width = 220, TextAlign = UiTextAlign.Right },
new UiGridColumn { Field = "Status", HeaderText = "Presence", Width = 200, TextAlign = UiTextAlign.Center, Visible = false },
new UiGridColumn { Field = "WorkMode", HeaderText = "Work Mode", Width = 230, Visible = false },
new UiGridColumn { Field = "LeaveAvailability", HeaderText = "Leave Availability", Width = 400, TextAlign = UiTextAlign.Center, AllowFiltering = false, AllowSorting = false, Visible = false },
new UiGridColumn { Field = "LeaveCount", HeaderText = "Leave Taken", Type = UiColumnType.Number, Width = 230, TextAlign = UiTextAlign.Center, Visible = false },
new UiGridColumn { Field = "Department", HeaderText = "Department", Width = 200, Visible = false },
new UiGridColumn { Field = "ProjectDetails", HeaderText = "Project Details", Width = 230, Visible = false },
new UiGridColumn { Field = "ProjectStatus", HeaderText = "Project Status", Width = 200, Visible = false },
new UiGridColumn { Field = "Email", HeaderText = "Email", Width = 200, TextAlign = UiTextAlign.Center }
}
})
<style>
#EmployeeTreeGrid .e-mail,
#EmployeeTreeGrid .e-icon-userlogin,
#EmployeeTreeGrid .e-location,
#EmployeeTreeGrid .e-icon-calender {
margin-right: 5px;
font-size: 12px !important;
}
/* Light Themes */
.tailwind #EmployeeTreeGrid .email-link,
.tailwind3 #EmployeeTreeGrid .email-link,
.bootstrap #EmployeeTreeGrid .email-link,
.bootstrap4 #EmployeeTreeGrid .email-link,
.bootstrap5 #EmployeeTreeGrid .email-link,
.fluent #EmployeeTreeGrid .email-link,
.fluent2 #EmployeeTreeGrid .email-link,
.fluent2-highcontrast #EmployeeTreeGrid .email-link,
.highcontrast #EmployeeTreeGrid .email-link,
.material #EmployeeTreeGrid .email-link,
.material3 #EmployeeTreeGrid .email-link,
.fabric #EmployeeTreeGrid .email-link {
background-color: #ebf1ff;
font-size: xx-small;
}
.tailwind #EmployeeTreeGrid .employee-title,
.tailwind3 #EmployeeTreeGrid .employee-title,
.bootstrap #EmployeeTreeGrid .employee-title,
.bootstrap4 #EmployeeTreeGrid .employee-title,
.bootstrap5 #EmployeeTreeGrid .employee-title,
.fluent #EmployeeTreeGrid .employee-title,
.fluent2 #EmployeeTreeGrid .employee-title,
.fluent2-highcontrast #EmployeeTreeGrid .employee-title,
.highcontrast #EmployeeTreeGrid .employee-title,
.material #EmployeeTreeGrid .employee-title,
.material3 #EmployeeTreeGrid .employee-title,
.fabric #EmployeeTreeGrid .employee-title {
color: gray;
}
/* Dark Themes */
.tailwind-dark #EmployeeTreeGrid .email-link,
.tailwind3-dark #EmployeeTreeGrid .email-link,
.bootstrap-dark #EmployeeTreeGrid .email-link,
.bootstrap5-dark #EmployeeTreeGrid .email-link,
.fluent-dark #EmployeeTreeGrid .email-link,
.fluent2-dark #EmployeeTreeGrid .email-link,
.material-dark #EmployeeTreeGrid .email-link,
.material3-dark #EmployeeTreeGrid .email-link,
.fabric-dark #EmployeeTreeGrid .email-link {
background-color: #000000aa;
color: #6179ff;
font-size: xx-small;
}
.tailwind-dark #EmployeeTreeGrid .employee-title,
.tailwind3-dark #EmployeeTreeGrid .employee-title,
.bootstrap-dark #EmployeeTreeGrid .employee-title,
.bootstrap5-dark #EmployeeTreeGrid .employee-title,
.fluent-dark #EmployeeTreeGrid .employee-title,
.fluent2-dark #EmployeeTreeGrid .employee-title,
.material-dark #EmployeeTreeGrid .employee-title,
.material3-dark #EmployeeTreeGrid .employee-title,
.fabric-dark #EmployeeTreeGrid .employee-title {
color: lightgray;
}
#EmployeeTreeGrid .e-headertext,
#EmployeeTreeGrid .e-headercelldiv {
font-size: medium;
}
#EmployeeTreeGrid .employee-cell {
padding: 8px 10px;
}
#EmployeeTreeGrid .employee-content {
display: flex;
align-items: center;
}
#EmployeeTreeGrid .employee-img {
border-radius: 50%;
margin: 0 10px;
width: 30px;
height: 30px;
}
#EmployeeTreeGrid .employee-info {
display: flex;
flex-direction: column;
}
#EmployeeTreeGrid .employee-name {
font-size: 14px;
font-weight: 500;
}
#EmployeeTreeGrid .employee-title {
font-size: 10px;
}
#EmployeeTreeGrid .flag-container {
display: inline-block;
}
#EmployeeTreeGrid .flag-img {
width: 20px;
height: 13px;
}
#EmployeeTreeGrid .flag-text {
display: inline-block;
padding: 0 6px;
vertical-align: middle;
}
#EmployeeTreeGrid .email-cell {
padding: 8px 10px;
}
#EmployeeTreeGrid .email-link {
font-size: 13px;
padding: 4px 8px;
}
.fluent2,
.fluent2-dark,
.fluent2-highcontrast {
#EmployeeTreeGrid #columnddl .e-input-group
{
width: 140px !important;
}
}
#EmployeeTreeGrid .leave-bar-container {
display: flex;
justify-content: center;
gap: 8px;
padding: 2px 0;
}
#EmployeeTreeGrid .leave-bar {
display: flex;
align-items: center;
gap: 5px;
}
#EmployeeTreeGrid .leave-label {
text-align: right;
}
#EmployeeTreeGrid .bar {
width: 50px;
height: 15px;
background-color: #eee;
position: relative;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
font-weight: 500;
color: #000000;
padding: 6px 4px;
}
#EmployeeTreeGrid .barlabel {
position: absolute;
z-index: 1;
pointer-events: none;
}
#EmployeeTreeGrid .bar-fill {
height: 100%;
position: absolute;
top: 0;
left: 0;
}
#EmployeeTreeGrid .bar-fill.low {
background-color: #df2222;
}
#EmployeeTreeGrid .bar-fill.medium {
background-color: #ffc400;
}
#EmployeeTreeGrid .bar-fill.high {
background-color: #00b300;
}
#EmployeeTreeGrid .separator {
width: 1px;
background-color: #ccc;
margin: 0 8px;
}
.viewer-container {
margin: 10px;
}
.viewer-row {
display: flex;
align-items: center;
}
.viewer-label {
margin-right: 10px;
font-weight: bold;
}
.dropdown-container {
width: 300px;
}
</style>
<div class="viewer-container">
<div class="viewer-row">
<label for="view" class="viewer-label">Select Viewer Role:</label>
<select id="view">@foreach (var option in (string[])ViewBag.data) { <option value="@option">@option</option> }</select>
</div>
</div>
<template id="employeeHeaderTemplate"><img src="@Url.Content("~/Content/images/treegrid/Resources.png")" alt="Name" width="20" height="20" style="padding-bottom: 1px" class="resources" /><span> Name</span></template>
@Html.UiTreeGrid(new UiTreeGridOptions
{
Id = "EmployeeTreeGrid",
Data = ViewBag.data1,
AllowSorting = true,
AllowFiltering = true,
FilterType = UiGridFilterType.Menu,
FilterHierarchyMode = UiTreeFilterMode.None,
Height = "400px",
GridLines = UiGridLines.Both,
ChildMapping = "Children",
TreeColumnIndex = 0,
AllowPaging = true,
PageSize = 10,
Selection = UiGridSelection.Single,
OnQueryCellInfo = "onQueryCellInfo",
Columns = new List<UiGridColumn>
{
new UiGridColumn { Field = "ID", HeaderText = "ID", Width = 200, TextAlign = UiTextAlign.Left },
new UiGridColumn { Field = "EmployeeName", HeaderText = "Name", HeaderTemplate = "#employeeHeaderTemplate", Width = 250 },
new UiGridColumn { Field = "Location", HeaderText = "Location", Width = 200 },
new UiGridColumn { Field = "JoinDate", HeaderText = "Date Joined", Type = UiColumnType.Date, Format = "M/d/yyyy", Width = 180, TextAlign = UiTextAlign.Right },
new UiGridColumn { Field = "Salary", HeaderText = "Salary Per Month", Type = UiColumnType.Number, Format = "C0", Width = 220, TextAlign = UiTextAlign.Right },
new UiGridColumn { Field = "Status", HeaderText = "Presence", Width = 200, TextAlign = UiTextAlign.Center, Visible = false },
new UiGridColumn { Field = "WorkMode", HeaderText = "Work Mode", Width = 230, Visible = false },
new UiGridColumn { Field = "LeaveAvailability", HeaderText = "Leave Availability", Width = 400, TextAlign = UiTextAlign.Center, AllowFiltering = false, AllowSorting = false, Visible = false },
new UiGridColumn { Field = "LeaveCount", HeaderText = "Leave Taken", Type = UiColumnType.Number, Width = 230, TextAlign = UiTextAlign.Center, Visible = false },
new UiGridColumn { Field = "Department", HeaderText = "Department", Width = 200, Visible = false },
new UiGridColumn { Field = "ProjectDetails", HeaderText = "Project Details", Width = 230, Visible = false },
new UiGridColumn { Field = "ProjectStatus", HeaderText = "Project Status", Width = 200, Visible = false },
new UiGridColumn { Field = "Email", HeaderText = "Email", Width = 200, TextAlign = UiTextAlign.Center }
}
})
<script>
var imageFolder = '@Url.Content("~/Content/images/treegrid/")';
var roleColumns = {
'HR': ['Location', 'JoinDate', 'Salary', 'Email'],
'Employee': ['Status', 'WorkMode', 'Email'],
'Help Desk': ['Status', 'LeaveAvailability', 'LeaveCount'],
'Project Management': ['Department', 'ProjectDetails', 'ProjectStatus', 'Email']
};
var shownColumns = roleColumns['HR'];
document.getElementById('view').value = 'HR';
// Syncfusion: a role shows its own columns; the filters and the sort are cleared.
document.getElementById('view').addEventListener('change', function (e) {
var tree = window.Lumen.get('EmployeeTreeGrid');
tree.clearFiltering();
tree.clearSorting();
tree.hideColumns(shownColumns);
shownColumns = roleColumns[e.target.value];
tree.showColumns(shownColumns);
});
function image(file, className, alt) {
var img = document.createElement('img');
img.src = imageFolder + file;
img.className = className;
img.alt = alt;
return img;
}
function text(tag, className, value) {
var element = document.createElement(tag);
element.className = className;
element.textContent = value;
return element;
}
function updateBar(bar, value) {
var fill = document.createElement('div');
fill.className = 'bar-fill ' + (value > 8 ? 'high' : value > 4 ? 'medium' : 'low');
fill.style.width = (value / 12) * 100 + '%';
bar.appendChild(fill);
bar.appendChild(text('div', 'barlabel', String(value)));
}
// Syncfusion's templates (employee, flag, email, status, leave bars) as elements.
function onQueryCellInfo(args) {
var d = args.data, box;
if (args.column === 'EmployeeName') {
box = document.createElement('div');
box.className = 'employee-content';
box.appendChild(image(d.FullName + '.png', 'employee-img', d.FullName));
var info = document.createElement('div');
info.className = 'employee-info';
info.appendChild(text('span', 'employee-name', d.EmployeeName));
info.appendChild(text('span', 'employee-title', d.JobTitle));
box.appendChild(info);
args.content = box;
} else if (args.column === 'Location') {
box = document.createElement('div');
var flag = document.createElement('div');
flag.className = 'flag-container';
flag.appendChild(image(d.Location + '.png', 'flag-img', d.Location));
box.appendChild(flag);
box.appendChild(text('div', 'flag-text', d.Location));
args.content = box;
} else if (args.column === 'Email') {
var link = text('a', 'email-link', d.Email);
link.href = 'mailto:' + d.Email;
args.content = link;
} else if (args.column === 'Status') {
box = document.createElement('div');
box.className = 'status-container';
var status = text('span', 'statustxt', d.Status);
var colours = d.Status === 'Available' ? ['#ccffcc', '#00cc00'] : d.Status === 'Busy' ? ['#ffd09d', '#ff8707'] : ['#ffd7cc', '#e60000'];
status.style.cssText = 'background-color:' + colours[0] + '; color:' + colours[1] + '; border-radius:4px; padding:0 4px; font-size:12px; text-align:center;';
box.appendChild(status);
args.content = box;
} else if (args.column === 'LeaveAvailability' && d.LeaveAvailability) {
box = document.createElement('div');
box.className = 'leave-bar-container';
[['Casual', d.LeaveAvailability.Casual], ['Earned', d.LeaveAvailability.Earned], ['Sick', d.LeaveAvailability.Sick]].forEach(function (leave, i) {
if (i) { box.appendChild(text('div', 'separator', '')); }
var holder = document.createElement('div');
holder.className = 'leave-bar';
holder.appendChild(text('span', 'leave-label', leave[0]));
var bar = document.createElement('div');
bar.className = 'bar ' + leave[0].toLowerCase();
updateBar(bar, leave[1]);
holder.appendChild(bar);
box.appendChild(holder);
});
args.content = box;
}
}
</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/EmployeeManagement.cshtml; it draws what ViewData holds.
public ActionResult EmployeeManagement()
{
ViewBag.data1 = EmployeeManagement.GetData();
ViewBag.data = new string[] { "HR", "Employee", "Help Desk", "Project Management" };
ViewBag.value = "HR";
return View();
}
public class LeaveAvailability
{
public int Casual { get; set; }
public int Earned { get; set; }
public int Sick { get; set; }
}
public class EmployeeManagement
{
public EmployeeManagement() { }
public string ID { get; set; }
public string EmployeeName { get; set; }
public string FullName { get; set; }
public string Email { get; set; }
public string Department { get; set; }
public string JobTitle { get; set; }
public string Location { get; set; }
public DateTime JoinDate { get; set; }
public double Salary { get; set; }
public string Status { get; set; }
public string Contact { get; set; }
public int LeaveCount { get; set; }
public LeaveAvailability LeaveAvailability { get; set; }
public string ProjectDetails { get; set; }
public string ProjectStatus { get; set; }
public int Experience { get; set; }
public string WorkMode { get; set; }
public List<EmployeeManagement> Children { get; set; }
public static List<EmployeeManagement> GetData()
{
return new List<EmployeeManagement>
{
new EmployeeManagement
{
ID = "EMP001",
EmployeeName = "Steven Buchanan",
FullName = "StevenBuchanan",
Email = "stevenbuchanan@abc.com",
Department = "Director",
JobTitle = "CEO",
Location = "USA",
JoinDate = new DateTime(2010, 4, 23),
Salary = 300000,
Status = "Available",
Contact = "1234567890",
LeaveCount = 12,
LeaveAvailability = new LeaveAvailability { Casual = 2, Earned = 5, Sick = 12 },
ProjectDetails = "",
ProjectStatus = "In Progress",
Experience = 20,
WorkMode = "Work From Home",
Children = new List<EmployeeManagement>
{
new EmployeeManagement
{
ID = "EMP002",
EmployeeName = "Romey Wilson",
FullName = "RomeyWilson",
Email = "romeywilson@abc.com",
Department = "Development",
JobTitle = "Manager",
Location = "USA",
JoinDate = new DateTime(2018, 4, 23),
Salary = 150000,
Status = "Available",
Contact = "9876543210",
LeaveCount = 4,
LeaveAvailability = new LeaveAvailability { Casual = 10, Earned = 11, Sick = 11 },
ProjectDetails = "Smart Inventory Management",
ProjectStatus = "Pending",
Experience = 10,
WorkMode = "Work From Home",
Children = new List<EmployeeManagement>
{
new EmployeeManagement
{
ID = "EMP003",
EmployeeName = "Robert King",
FullName = "RobertKing",
Email = "robertking@abc.com",
Department = "Development",
JobTitle = "Team Lead",
Location = "Germany",
JoinDate = new DateTime(2018, 4, 23),
Salary = 100000,
Status = "Leave",
Contact = "5551112233",
LeaveCount = 1,
LeaveAvailability = new LeaveAvailability { Casual = 12, Earned = 11, Sick = 12 },
ProjectDetails = "Smart Inventory Management",
ProjectStatus = "In Progress",
Experience = 7,
WorkMode = "Work From Home",
Children = new List<EmployeeManagement>
{
new EmployeeManagement
{
ID = "EMP004",
EmployeeName = "Andrew Fuller",
FullName = "AndrewFuller",
Email = "andrewfuller@abc.com",
Department = "Development",
JobTitle = "EmployeeManagement",
Location = "Canada",
JoinDate = new DateTime(2018, 4, 23),
Salary = 60000,
Status = "Available",
Contact = "5551112233",
LeaveCount = 1,
LeaveAvailability = new LeaveAvailability { Casual = 12, Earned = 11, Sick = 12 },
ProjectDetails = "Smart Inventory Management",
ProjectStatus = "In Progress",
Experience = 2,
WorkMode = "Work From Home",
},
new EmployeeManagement
{
ID = "EMP005",
EmployeeName = "Anne Dodsworth",
FullName = "AnneDodsworth",
Email = "annedodsworth@abc.com",
Department = "Development",
JobTitle = "EmployeeManagement",
Location = "Egypt",
JoinDate = new DateTime(2018, 4, 23),
Salary = 70000,
Status = "Available",
Contact = "5551112233",
LeaveCount = 12,
LeaveAvailability = new LeaveAvailability { Casual = 8, Earned = 4, Sick = 12 },
ProjectDetails = "Smart Inventory Management",
ProjectStatus = "In Progress",
Experience = 2,
WorkMode = "Work From Home",
},
new EmployeeManagement
{
ID = "EMP006",
EmployeeName = "Davey Hanks",
FullName = "DaveyHanks",
Email = "daveyhanks@abc.com",
Department = "Development",
JobTitle = "EmployeeManagement",
Location = "Greece",
JoinDate = new DateTime(2019, 7, 12),
Salary = 76000,
Status = "Available",
Contact = "5552223344",
LeaveCount = 5,
LeaveAvailability = new LeaveAvailability { Casual = 11, Earned = 8, Sick = 12 },
ProjectDetails = "Support Ticket System",
ProjectStatus = "In Progress",
Experience = 5,
WorkMode = "Work From Home",
},
new EmployeeManagement
{
ID = "EMP007",
EmployeeName = "Jason Gills",
FullName = "JasonGills",
Email = "jasongills@abc.com",
Department = "Development",
JobTitle = "EmployeeManagement",
Location = "USA",
JoinDate = new DateTime(2020, 1, 30),
Salary = 72000,
Status = "Busy",
Contact = "5553334455",
LeaveCount = 7,
LeaveAvailability = new LeaveAvailability { Casual = 9, Earned = 8, Sick = 12 },
ProjectDetails = "Support Ticket System",
ProjectStatus = "In Progress",
Experience = 4,
WorkMode = "Hybrid",
},
new EmployeeManagement
{
ID = "EMP008",
EmployeeName = "Laura Callahan",
FullName = "LauraCallahan",
Email = "lauracallahan@abc.com",
Department = "Development",
JobTitle = "EmployeeManagement",
Location = "Canada",
JoinDate = new DateTime(2017, 10, 5),
Salary = 78000,
Status = "Available",
Contact = "5554445566",
LeaveCount = 1,
LeaveAvailability = new LeaveAvailability { Casual = 11, Earned = 12, Sick = 12 },
ProjectDetails = "Support Ticket System",
ProjectStatus = "Completed",
Experience = 3,
WorkMode = "Hybrid",
},
new EmployeeManagement
{
ID = "EMP009",
EmployeeName = "Jade Lynch",
FullName = "JadeLynch",
Email = "barrylynch@abc.com",
Department = "Development",
JobTitle = "EmployeeManagement",
Location = "USA",
JoinDate = new DateTime(2021, 8, 18),
Salary = 71000,
Status = "Available",
Contact = "5556667788",
LeaveCount = 20,
LeaveAvailability = new LeaveAvailability { Casual = 4, Earned = 11, Sick = 1 },
ProjectDetails = "Support Ticket System",
ProjectStatus = "In Progress",
Experience = 2,
WorkMode = "Hybrid",
}
}
}
}
},
new EmployeeManagement
{
ID = "EMP010",
EmployeeName = "David William",
FullName = "DavidWilliam",
Email = "davidwilliam@abc.com",
Department = "UI/UX",
JobTitle = "Manager",
Location = "Greece",
JoinDate = new DateTime(2018, 4, 23),
Salary = 170000,
Status = "Leave",
Contact = "5551112233",
LeaveCount = 1,
LeaveAvailability = new LeaveAvailability { Casual = 12, Earned = 11, Sick = 12 },
ProjectDetails = "Chat Bot",
ProjectStatus = "Pending",
Experience = 12,
WorkMode = "Work From Office",
Children = new List<EmployeeManagement>
{
new EmployeeManagement
{
ID = "EMP011",
EmployeeName = "Janet Leverling",
FullName = "JanetLeverling",
Email = "janetleverling@abc.com",
Department = "UI/UX",
JobTitle = "Team Lead",
Location = "USA",
JoinDate = new DateTime(2018, 4, 23),
Salary = 120000,
Status = "Available",
Contact = "5551112233",
LeaveCount = 4,
LeaveAvailability = new LeaveAvailability { Casual = 11, Earned = 10, Sick = 11 },
ProjectDetails = "Chat Bot",
ProjectStatus = "In Progress",
Experience = 7,
WorkMode = "Work From Office",
Children = new List<EmployeeManagement>
{
new EmployeeManagement
{
ID = "EMP012",
EmployeeName = "Aria Jose",
FullName = "AriaJose",
Email = "ariajose@abc.com",
Department = "UI/UX",
JobTitle = "EmployeeManagement",
Location = "Greece",
JoinDate = new DateTime(2018, 4, 23),
Salary = 80000,
Status = "Leave",
Contact = "5551112233",
LeaveCount = 9,
LeaveAvailability = new LeaveAvailability { Casual = 3, Earned = 12, Sick = 12 },
ProjectDetails = "Chat Bot",
ProjectStatus = "Completed",
Experience = 1,
WorkMode = "Work From Office",
},
new EmployeeManagement
{
ID = "EMP013",
EmployeeName = "Margaret Peacock",
FullName = "MargaretPeacock",
Email = "margaretpeacock@abc.com",
Department = "UI/UX",
JobTitle = "EmployeeManagement",
Location = "Germany",
JoinDate = new DateTime(2018, 4, 23),
Salary = 75000,
Status = "Available",
Contact = "5551112233",
LeaveCount = 9,
LeaveAvailability = new LeaveAvailability { Casual = 5, Earned = 10, Sick = 12 },
ProjectDetails = "Chat Bot",
ProjectStatus = "Completed",
Experience = 3,
WorkMode = "Work From Office",
},
new EmployeeManagement
{
ID = "EMP014",
EmployeeName = "George Miller",
FullName = "GeorgeMiller",
Email = "georgemiller@abc.com",
Department = "UI/UX",
JobTitle = "EmployeeManagement",
Location = "Egypt",
JoinDate = new DateTime(2020, 2, 10),
Salary = 69000,
Status = "Busy",
Contact = "5557778899",
LeaveCount = 18,
LeaveAvailability = new LeaveAvailability { Casual = 12, Earned = 6, Sick = 0 },
ProjectDetails = "Dashboard UI",
ProjectStatus = "In Progress",
Experience = 3,
WorkMode = "Work From Office",
},
new EmployeeManagement
{
ID = "EMP015",
EmployeeName = "David William",
FullName = "DavidWilliam",
Email = "davidwilliam@abc.com",
Department = "UI/UX",
JobTitle = "EmployeeManagement",
Location = "Canada",
JoinDate = new DateTime(2016, 6, 15),
Salary = 85000,
Status = "Available",
Contact = "5558889900",
LeaveCount = 6,
LeaveAvailability = new LeaveAvailability { Casual = 9, Earned = 10, Sick = 11 },
ProjectDetails = "Dashboard UI",
ProjectStatus = "Completed",
Experience = 4,
WorkMode = "Work From Office",
},
new EmployeeManagement
{
ID = "EMP016",
EmployeeName = "Nancy Davolio",
FullName = "NancyDavolio",
Email = "nancydavolio@abc.com",
Department = "UI/UX",
JobTitle = "EmployeeManagement",
Location = "USA",
JoinDate = new DateTime(2018, 12, 3),
Salary = 74000,
Status = "Available",
Contact = "5559990011",
LeaveCount = 2,
LeaveAvailability = new LeaveAvailability { Casual = 12, Earned = 10, Sick = 12 },
ProjectDetails = "Dashboard UI",
ProjectStatus = "In Progress",
Experience = 5,
WorkMode = "Work From Office",
},
new EmployeeManagement
{
ID = "EMP017",
EmployeeName = "Merlyn Lawrance",
FullName = "MerlynLawrance",
Email = "merlynlawrance@abc.com",
Department = "UI/UX",
JobTitle = "EmployeeManagement",
Location = "USA",
JoinDate = new DateTime(2021, 3, 14),
Salary = 70000,
Status = "Busy",
Contact = "5551122334",
LeaveCount = 15,
LeaveAvailability = new LeaveAvailability { Casual = 6, Earned = 8, Sick = 7 },
ProjectDetails = "Dashboard UI",
ProjectStatus = "In Progress",
Experience = 2,
WorkMode = "Work From office",
},
}
}
}
},
new EmployeeManagement
{
ID = "EMP018",
EmployeeName = "Michael Suyama",
FullName = "MichaelSuyama",
Email = "michaelsuyama@abc.com",
Department = "Documentation",
JobTitle = "Manager",
Location = "Canada",
JoinDate = new DateTime(2018, 4, 23),
Salary = 160000,
Status = "Available",
Contact = "5551112233",
LeaveCount = 10,
LeaveAvailability = new LeaveAvailability { Casual = 7, Earned = 11, Sick = 8 },
ProjectDetails = "Documentation Review",
ProjectStatus = "Completed",
Experience = 13,
WorkMode = "Work From Home",
Children = new List<EmployeeManagement>
{
new EmployeeManagement
{
ID = "EMP019",
EmployeeName = "Linda Belton",
FullName = "LindaBelton",
Email = "lindabelton@abc.com",
Department = "Documentation",
JobTitle = "Team Lead",
Location = "Egypt",
JoinDate = new DateTime(2018, 4, 23),
Salary = 110000,
Status = "Available",
Contact = "5551112233",
LeaveCount = 6,
LeaveAvailability = new LeaveAvailability { Casual = 6, Earned = 12, Sick = 12 },
ProjectDetails = "Blazor Documentation",
ProjectStatus = "Completed",
Experience = 8,
WorkMode = "Work From Home",
Children = new List<EmployeeManagement>
{
new EmployeeManagement
{
ID = "EMP020",
EmployeeName = "Henry Williams",
FullName = "HenryWilliams",
Email = "henrywilliams@abc.com",
Department = "Documentation",
JobTitle = "EmployeeManagement",
Location = "Greece",
JoinDate = new DateTime(2018, 4, 23),
Salary = 85000,
Status = "Available",
Contact = "5551112233",
LeaveCount = 7,
LeaveAvailability = new LeaveAvailability { Casual = 6, Earned = 11, Sick = 12 },
ProjectDetails = "Blazor Documentation",
ProjectStatus = "Completed",
Experience = 3,
WorkMode = "Work From Home",
},
new EmployeeManagement
{
ID = "EMP021",
EmployeeName = "Janet Leverling",
FullName = "JanetLeverling",
Email = "janetleverling@abc.com",
Department = "Documentation",
JobTitle = "EmployeeManagement",
Location = "USA",
JoinDate = new DateTime(2018, 4, 23),
Salary = 60000,
Status = "Leave",
Contact = "5551112233",
LeaveCount = 14,
LeaveAvailability = new LeaveAvailability { Casual = 12, Earned = 3, Sick = 7 },
ProjectDetails = "Blazor Documentation",
ProjectStatus = "Completed",
Experience = 2,
WorkMode = "Work From Home",
},
new EmployeeManagement
{
ID = "EMP022",
EmployeeName = "Yvonne McKay",
FullName = "YvonneMcKay",
Email = "yvonnemcKay@abc.com",
Department = "Documentation",
JobTitle = "EmployeeManagement",
Location = "Greece",
JoinDate = new DateTime(2019, 11, 9),
Salary = 79000,
Status = "Available",
Contact = "5553344556",
LeaveCount = 3,
LeaveAvailability = new LeaveAvailability { Casual = 10, Earned = 11, Sick = 12 },
ProjectDetails = "Typescript Documentation",
ProjectStatus = "Completed",
Experience = 4,
WorkMode = "Hybrid",
},
new EmployeeManagement
{
ID = "EMP023",
EmployeeName = "Tedd Lawson",
FullName = "TeddLawson",
Email = "teddlawson@abc.com",
Department = "Documentation",
JobTitle = "EmployeeManagement",
Location = "USA",
JoinDate = new DateTime(2015, 9, 21),
Salary = 88000,
Status = "Available",
Contact = "5554455667",
LeaveCount = 0,
LeaveAvailability = new LeaveAvailability { Casual = 12, Earned = 12, Sick = 12 },
ProjectDetails = "React Documentation",
ProjectStatus = "Completed",
Experience = 1,
WorkMode = "Hybrid"
},
new EmployeeManagement
{
ID = "EMP024",
EmployeeName = "Bobby Knight",
FullName = "BobbyKnight",
Email = "bobbyknight@abc.com",
Department = "Documentation",
JobTitle = "Employee",
Location = "Germany",
JoinDate = new DateTime(2020, 5, 5),
Salary = 75000,
Status = "Busy",
Contact = "5555566778",
LeaveCount = 9,
LeaveAvailability = new LeaveAvailability { Casual = 9, Earned = 6, Sick = 12 },
ProjectDetails = "Release Notes",
ProjectStatus = "Completed",
Experience = 2,
WorkMode = "Hybrid"
},
new EmployeeManagement
{
ID = "EMP025",
EmployeeName = "Scarlet Portman",
FullName = "ScarletPortman",
Email = "scarletportman@abc.com",
Department = "Documentation",
JobTitle = "Employee",
Location = "Egypt",
JoinDate = new DateTime(2018, 1, 20),
Salary = 71000,
Status = "Available",
Contact = "5556677889",
LeaveCount = 14,
LeaveAvailability = new LeaveAvailability { Casual = 7, Earned = 3, Sick = 12 },
ProjectDetails = "Release Notes",
ProjectStatus = "Completed",
Experience = 3,
WorkMode = "Hybrid"
},
new EmployeeManagement
{
ID = "EMP026",
EmployeeName = "Isabella Johnson",
FullName = "IsabellaJohnson",
Email = "isabellajohnson@abc.com",
Department = "Network",
JobTitle = "Manager",
Location = "Canada",
JoinDate = new DateTime(2018, 4, 23),
Salary = 140000,
Status = "Available",
Contact = "5551112233",
LeaveCount = 2,
LeaveAvailability = new LeaveAvailability { Casual = 12, Earned = 10, Sick = 12 },
ProjectDetails = "Intruder detection system",
ProjectStatus = "Completed",
Experience = 15,
WorkMode = "Work From Office",
Children = new List<EmployeeManagement>
{
new EmployeeManagement
{
ID = "EMP027",
EmployeeName = "Nathan Drake",
FullName = "NathanDrake",
Email = "nathandrake@abc.com",
Department = "Network",
JobTitle = "Team Lead",
Location = "Germany",
JoinDate = new DateTime(2018, 4, 23),
Salary = 105000,
Status = "Leave",
Contact = "5551112233",
LeaveCount = 10,
LeaveAvailability = new LeaveAvailability { Casual = 11, Earned = 7, Sick = 8 },
ProjectDetails = "Intruder detection system",
ProjectStatus = "Completed",
Experience = 7,
WorkMode = "Work From Office",
Children = new List<EmployeeManagement>
{
new EmployeeManagement
{
ID = "EMP028",
EmployeeName = "Sherly Hathaway",
FullName = "SherlyHathaway",
Email = "sherlyhathaway@abc.com",
Department = "Network",
JobTitle = "Employee",
Location = "Canada",
JoinDate = new DateTime(2018, 4, 23),
Salary = 70000,
Status = "Available",
Contact = "5551112233",
LeaveCount = 0,
LeaveAvailability = new LeaveAvailability { Casual = 12, Earned = 12, Sick = 12 },
ProjectDetails = "Intruder detection system",
ProjectStatus = "Completed",
Experience = 1,
WorkMode = "Work From Office"
},
new EmployeeManagement
{
ID = "EMP029",
EmployeeName = "Neil Kepler",
FullName = "NeilKepler",
Email = "neilkepler@abc.com",
Department = "Network",
JobTitle = "Employee",
Location = "Greece",
JoinDate = new DateTime(2018, 4, 23),
Salary = 80000,
Status = "Available",
Contact = "5551112233",
LeaveCount = 5,
LeaveAvailability = new LeaveAvailability { Casual = 12, Earned = 7, Sick = 12 },
ProjectDetails = "Firewall Configuration",
ProjectStatus = "Completed",
Experience = 2,
WorkMode = "Work From Office"
},
new EmployeeManagement
{
ID = "EMP030",
EmployeeName = "Romey Wilson",
FullName = "RomeyWilson",
Email = "romeywilson@abc.com",
Department = "Network",
JobTitle = "Employee",
Location = "USA",
JoinDate = new DateTime(2022, 2, 11),
Salary = 67000,
Status = "Busy",
Contact = "5557788990",
LeaveCount = 3,
LeaveAvailability = new LeaveAvailability { Casual = 12, Earned = 12, Sick = 9 },
ProjectDetails = "Firewall Configuration",
ProjectStatus = "In Progress",
Experience = 1,
WorkMode = "Work From Office"
},
new EmployeeManagement
{
ID = "EMP031",
EmployeeName = "Richard Roe",
FullName = "RichardRoe",
Email = "richardroe@abc.com",
Department = "Network",
JobTitle = "Employee",
Location = "Canada",
JoinDate = new DateTime(2020, 8, 25),
Salary = 76000,
Status = "Available",
Contact = "5558899001",
LeaveCount = 1,
LeaveAvailability = new LeaveAvailability { Casual = 12, Earned = 11, Sick = 12 },
ProjectDetails = "Firewall Configuration",
ProjectStatus = "Completed",
Experience = 2,
WorkMode = "Work From Office"
},
new EmployeeManagement
{
ID = "EMP032",
EmployeeName = "Chris Mathew",
FullName = "ChrisMathew",
Email = "chrismathew@abc.com",
Department = "Network",
JobTitle = "Employee",
Location = "Greece",
JoinDate = new DateTime(2021, 12, 7),
Salary = 73000,
Status = "Busy",
Contact = "5559900112",
LeaveCount = 8,
LeaveAvailability = new LeaveAvailability { Casual = 4, Earned = 12, Sick = 12 },
ProjectDetails = "Network Topology Mapping",
ProjectStatus = "In Progress",
Experience = 3,
WorkMode = "Work From Office"
},
new EmployeeManagement
{
ID = "EMP033",
EmployeeName = "Sara Callagen",
FullName = "SaraCallagen",
Email = "saracallagen@abc.com",
Department = "Network",
JobTitle = "Employee",
Location = "Germany",
JoinDate = new DateTime(2017, 3, 16),
Salary = 80000,
Status = "Available",
Contact = "5550011223",
LeaveCount = 7,
LeaveAvailability = new LeaveAvailability { Casual = 6, Earned = 11, Sick = 12 },
ProjectDetails = "Network Topology Mapping",
ProjectStatus = "Completed",
Experience = 1,
WorkMode = "Work From Office"
}
}
}
}
}
}
}
}
}
}
},
};
}
}
}
}
@* 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>
This section highlights dynamic column generation and custom templates to present data that is specific and relevant to each viewer role. Features such as Sorting, Filtering with hierarchical support and Column formatting are seamlessly integrated. The Tree Grid Column template is utilized to render visual elements like progress bars within cells, further enhancing the user experience. The Tree Grid flexibility and customization capabilities make it a powerful tool for organizational data representation.