@@ -26,11 +26,13 @@ The default menu items are:
2626| ` Column Chooser ` | Choose column visibility. |
2727| ` Filter ` | Show the filter menu based on column type. |
2828
29- ``` cshtml
29+ {% tabs %}
30+ {% highlight razor tabtitle="Index.razor" %}
31+
3032@using Syncfusion.Blazor.Gantt
3133
3234<SfGantt DataSource =" @TaskCollection " Height =" 450px " Width =" 700px " AllowResizing =" true " ShowColumnMenu =" true " AllowFiltering =" true " AllowSorting =" true " >
33- <GanttTaskFields Id="TaskId " Name="TaskName" StartDate="StartDate" EndDate="EndDate" Duration="Duration" Progress="Progress" ParentID="ParentId "></GanttTaskFields>
35+ <GanttTaskFields Id="TaskID " Name="TaskName" StartDate="StartDate" EndDate="EndDate" Duration="Duration" Progress="Progress" ParentID="ParentID "></GanttTaskFields>
3436</SfGantt >
3537
3638@code {
@@ -43,34 +45,36 @@ The default menu items are:
4345
4446 public class TaskData
4547 {
46- public int TaskId { get; set; }
48+ public int TaskID { get; set; }
4749 public string TaskName { get; set; }
4850 public DateTime StartDate { get; set; }
4951 public DateTime? EndDate { get; set; }
5052 public string Duration { get; set; }
5153 public int Progress { get; set; }
52- public int? ParentId { get; set; }
54+ public int? ParentID { get; set; }
5355 }
5456
5557 public static List<TaskData> GetTaskCollection()
5658 {
5759 List<TaskData> Tasks = new List<TaskData>()
5860 {
59- new TaskData() { TaskId = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 04, 05), EndDate = new DateTime(2022, 04, 21) },
60- new TaskData() { TaskId = 2, TaskName = "Identify site location", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentId = 1 },
61- new TaskData() { TaskId = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 04, 05), Duration = "4", Progress = 40, ParentId = 1 },
62- new TaskData() { TaskId = 4, TaskName = "Soil test approval", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentId = 1 },
63- new TaskData() { TaskId = 5, TaskName = "Project estimation", StartDate = new DateTime(2022, 04, 06), EndDate = new DateTime(2022, 04, 21) },
64- new TaskData() { TaskId = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 30, ParentId = 5 },
65- new TaskData() { TaskId = 7, TaskName = "List materials", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 40, ParentId = 5 },
66- new TaskData() { TaskId = 8, TaskName = "Estimation approval", StartDate = new DateTime(2022, 04, 06), Duration = "0", Progress = 30, ParentId = 5 }
61+ new TaskData() { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 04, 05), EndDate = new DateTime(2022, 04, 21) },
62+ new TaskData() { TaskID = 2, TaskName = "Identify site location", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentID = 1 },
63+ new TaskData() { TaskID = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 04, 05), Duration = "4", Progress = 40, ParentID = 1 },
64+ new TaskData() { TaskID = 4, TaskName = "Soil test approval", StartDate = new DateTime(2022, 04, 05), Duration = "0", Progress = 30, ParentID = 1 },
65+ new TaskData() { TaskID = 5, TaskName = "Project estimation", StartDate = new DateTime(2022, 04, 06), EndDate = new DateTime(2022, 04, 21) },
66+ new TaskData() { TaskID = 6, TaskName = "Develop floor plan for estimation", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 30, ParentID = 5 },
67+ new TaskData() { TaskID = 7, TaskName = "List materials", StartDate = new DateTime(2022, 04, 06), Duration = "3", Progress = 40, ParentID = 5 },
68+ new TaskData() { TaskID = 8, TaskName = "Estimation approval", StartDate = new DateTime(2022, 04, 06), Duration = "0", Progress = 30, ParentID = 5 }
6769 };
6870 return Tasks;
6971 }
7072}
71- ```
7273
73- ![ Blazor Gantt Chart showing column menu with sorting, filtering, and autofit options] ( images/blazor-gantt-chart-column-menu.png )
74+ {% endhighlight %}
75+ {% endtabs %}
76+
77+ {% previewsample "https://blazorplayground.syncfusion.com/embed/BjVoMXiticGodFzW?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5 " %}
7478
7579> ** Note** : Disable the column menu for a specific column by setting [ GanttColumn.ShowColumnMenu] ( https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttColumn.html#Syncfusion_Blazor_Gantt_GanttColumn_ShowColumnMenu ) to ` false ` .
7680
0 commit comments