Syncfusion.AspNetMvc.Gantt
34.1.30
Prefix Reserved
dotnet add package Syncfusion.AspNetMvc.Gantt --version 34.1.30
NuGet\Install-Package Syncfusion.AspNetMvc.Gantt -Version 34.1.30
<PackageReference Include="Syncfusion.AspNetMvc.Gantt" Version="34.1.30" />
<PackageVersion Include="Syncfusion.AspNetMvc.Gantt" Version="34.1.30" />
<PackageReference Include="Syncfusion.AspNetMvc.Gantt" />
paket add Syncfusion.AspNetMvc.Gantt --version 34.1.30
#r "nuget: Syncfusion.AspNetMvc.Gantt, 34.1.30"
#:package Syncfusion.AspNetMvc.Gantt@34.1.30
#addin nuget:?package=Syncfusion.AspNetMvc.Gantt&version=34.1.30
#tool nuget:?package=Syncfusion.AspNetMvc.Gantt&version=34.1.30
Syncfusion® ASP.NET MVC Gantt Chart Component
Visualize and manage project schedules by displaying tasks, durations, dependencies, and progress in a timeline-based view, ideal for project management applications.
Key Features
- Timeline Task Visualization: Displays tasks as bars along a timeline with configurable time ranges and zoom levels
- Task Dependencies: Supports all 4 dependency types (Finish-to-Start, Start-to-Start, Finish-to-Finish, Start-to-Finish)
- Editing Capabilities: Inline editing, dialog editing, and taskbar drag-and-drop for flexible task updates
- Baseline Comparison: Support for comparing planned vs. actual schedules for performance tracking
- Critical Path Highlighting: Automatic highlighting of the critical path for project risk management
- Resource Allocation: Resource allocation and workload view for balancing team capacity
- Export Support: Export to PDF and Excel formats for reporting and sharing
- Performance: Virtualization for efficiently handling large datasets
- Customization: Custom event templates, progress visualization, and styling
- Accessibility: Full keyboard navigation and screen reader support
Common Setup
These setup steps are required only once for your application, regardless of which Syncfusion components you use.
1. Install Base NuGet Package
Install-Package Syncfusion.AspNetMvc.Gantt
2. Add Namespace Reference
Edit Web.config under the Views folder and add the Syncfusion.EJ2 namespace:
<namespaces>
<add namespace="Syncfusion.EJ2"/>
</namespaces>
3. Add Stylesheet & Script References
In your layout file (~/Views/Shared/_Layout.cshtml), add the following in the <head> section:
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewBag.Title - Syncfusion Application</title>
<link rel="stylesheet" href="https://cdn.syncfusion.com/ej2/34.1.30/fluent2.css" />
<script src="https://cdn.syncfusion.com/ej2/34.1.30/dist/ej2.min.js"></script>
</head>
4. Register Script Manager
At the end of the <body> tag in your layout file (~/Views/Shared/_Layout.cshtml):
<body>
@RenderBody()
@Html.EJS().ScriptManager()
</body>
Quick Start
Step 1: Add ASP.NET MVC Gantt control
Add the Syncfusion® ASP.NET MVC Gantt control ~/Views/Home/Index.cshtml page:
@model List<GanttDataSource>
@Html.EJS().Gantt("Gantt").DataSource((IEnumerable<object>)Model).Height("450px").TaskFields(ts => ts.Id("TaskId").Name(
"TaskName").StartDate("StartDate").EndDate("EndDate").Duration("Duration").Progress("Progress").ParentID("ParentID")).Render()
Step 2: Create controller ~/Controllers/HomeController.cs
using System;
using System.Collections.Generic;
using System.Web.Mvc;
public class HomeController : Controller
{
public ActionResult Index()
{
return View(ganttData());
}
public static List<GanttDataSource> ganttData()
{
List<GanttDataSource> GanttDataSourceCollection = new List<GanttDataSource>()
{
new GanttDataSource() { TaskId = 1, TaskName = "Project initiation", StartDate = new DateTime(2019, 04, 02), EndDate = new DateTime(2019, 04, 21) },
new GanttDataSource() { TaskId = 2, TaskName = "Identify site location", StartDate = new DateTime(2019, 04, 02), Duration = 4, Progress = 70, ParentID = 1 },
new GanttDataSource() { TaskId = 3, TaskName = "Perform soil test", StartDate = new DateTime(2019, 04, 02), Duration = 4, Progress = 50, ParentID = 1 },
new GanttDataSource() { TaskId = 4, TaskName = "Soil test approval", StartDate = new DateTime(2019, 04, 02), Duration = 4, Progress = 50, ParentID = 1 },
new GanttDataSource() { TaskId = 5, TaskName = "Project estimation", StartDate = new DateTime(2019, 04, 02), EndDate = new DateTime(2019, 04, 21) },
new GanttDataSource() { TaskId = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2019, 04, 04), Duration = 3, Progress = 70, ParentID = 5 },
new GanttDataSource() { TaskId = 7, TaskName = "List materials", StartDate = new DateTime(2019, 04, 04), Duration = 3, Progress = 50, ParentID = 5 }
};
return GanttDataSourceCollection;
}
}
public class GanttDataSource
{
public int TaskId { get; set; }
public string TaskName { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public int? Duration { get; set; }
public int Progress { get; set; }
public int? ParentID { get; set; }
}
Step 3: Run the Application
Press Ctrl+F5 to run the application in your browser.
Documentation
Support
License
This is a commercial product and requires a paid license for possession or use. Review the Syncfusion® EULA
About Syncfusion®
Syncfusion® provides 1600+ UI components and frameworks for web, mobile, and desktop development across multiple platforms:
Web: Blazor | ASP.NET MVC | ASP.NET MVC | JavaScript | Angular | React | Vue
Desktop: WinForms | WPF | WinUI
Learn more at www.syncfusion.com
sales@syncfusion.com | Toll Free: 1-888-9-DOTNET
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- Newtonsoft.Json (>= 13.0.3)
- Syncfusion.AspNetMvc.Base (>= 34.1.30)
- Syncfusion.AspNetMvc.Grid (>= 34.1.30)
- Syncfusion.EJ2.JavaScript (>= 34.1.30)
- Syncfusion.Licensing (>= 34.1.30)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.