{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "gantt-exporting",
  "framework": "aspnet-mvc",
  "type": "registry:component",
  "component": "Gantt",
  "variant": "exporting",
  "dependencies": [
    "Syncfusion.AspNetMvc.Gantt"
  ],
  "description": "Gantt chart with toolbar commands for exporting project data to Excel and PDF formats.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/aspnet-mvc/llms.txt",
    "skillPack": "syncfusion/aspnetmvc-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/aspnet-mvc/gantt-exporting.md"
  },
  "files": [
    {
      "target": "src/components/gantt-exporting/Gantt.cshtml",
      "content": "@using Syncfusion.EJ2\n@{\n    ViewData[\"Title\"] = \"Exporting\";\n}\n\n@section ControlsSection{\n    <div class=\"control-section\">\n        <div class=\"content-wrapper\">\n            <div>\n                @(Html.EJS().Gantt(\"GanttExport\")\n                .DataSource((IEnumerable<object>)ViewData[\"DataSource\"])\n                .AllowExcelExport(true)\n                .AllowPdfExport(true)\n                .TaskFields(ts => ts.Id(\"TaskId\").Name(\"TaskName\").StartDate(\"StartDate\").EndDate(\"EndDate\").Duration(\"Duration\")\n                    .Progress(\"Progress\").Dependency(\"Predecessor\").Child(\"SubTasks\").ResourceInfo(\"ResourceId\"))\n                .Toolbar(new List<string>() { \"ExcelExport\", \"CsvExport\", \"PdfExport\" })\n                .AllowSelection(true)\n                .GridLines(Syncfusion.EJ2.Gantt.GridLine.Both)\n                .Height(\"450px\")\n                .Holidays(hol =>\n                {\n                    hol.From(\"04/04/2024\").To(\"04/04/2024\").Label(\"Local Holiday\").Add();\n                    hol.From(\"04/19/2024\").To(\"04/19/2024\").Label(\"Good Friday\").Add();\n                    hol.From(\"04/30/2024\").To(\"04/30/2024\").Label(\"Release Holiday\").Add();\n                })\n                .EventMarkers(em =>\n                {\n                    em.Day(\"04/02/2024\").Label(\"Project starts\").Add();\n                    em.Day(\"04/09/2024\").Label(\"Design phase\").Add();\n                    em.Day(\"04/19/2024\").Label(\"Research phase\").Add();\n                    em.Day(\"05/23/2024\").Label(\"Production phase\").Add();\n                    em.Day(\"06/20/2024\").Label(\"Sales and marketing phase\").Add();\n                })\n                .TreeColumnIndex(1)\n                .ResourceFields(rf => rf.Id(\"ResourceId\").Name(\"ResourceName\"))\n                .Resources((IEnumerable<object>)ViewData[\"Resources\"])\n                .HighlightWeekends(true)\n                .Columns(col =>\n                {\n                    col.Field(\"TaskId\").Visible(false).Add();\n                    col.Field(\"TaskName\").HeaderText(\"Task Name\").Add();\n                })\n                .TimelineSettings(tl => tl.TopTier(tt =>\n                    tt.Unit(Syncfusion.EJ2.Gantt.TimelineViewMode.Week).Format(\"MMM dd, y\")).\n                    BottomTier(bt => bt.Unit(Syncfusion.EJ2.Gantt.TimelineViewMode.Day)))\n                .LabelSettings(ls => ls.LeftLabel(\"TaskName\"))\n                .ToolbarClick(\"toolbarClick\")\n                .ProjectStartDate(\"03/25/2024\")\n                .ProjectEndDate(\"07/28/2024\")\n                .Render()\n            )\n            </div>\n            <style>\n                .fluent2 #export,\n                .fluent2-dark #export {\n                    padding: 7px;\n                }\n            </style>\n            <script>\n                function toolbarClick(args) {\n                    if (args.item.id === \"GanttExport_excelexport\") {\n                        this.excelExport();\n                    }\n                    else if (args.item.id === \"GanttExport_csvexport\") {\n                        this.csvExport();\n                    }\n                    else if (args.item.id === \"GanttExport_pdfexport\") {\n                        this.pdfExport();\n                    }\n                }\n            </script>\n        </div>\n    </div>\n}"
    },
    {
      "target": "src/components/gantt-exporting/GanttController.cs",
      "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\nusing EJ2MVCSampleBrowser.Models;\nnamespace EJ2MVCSampleBrowser.Controllers.Gantt\n{\n    public partial class GanttChartController : Controller\n    {\n        // GET: Editing\n        public ActionResult Exporting()\n        {\n            ViewData[\"DataSource\"] = GanttData.EditingData();\n            ViewData[\"Resources\"] = GanttData.EditingResources();\n            return View(\"~/Views/Home/gantt/exporting/Gantt.cshtml\");\n        }\n    }\n}"
    }
  ]
}