Skip to content

Commit 6eff12d

Browse files
Merge pull request #6801 from syncfusion-content/982400-part5
982400: Part 5 - Check code snippet and make preview sample in blazor…
2 parents 3849824 + 1449b32 commit 6eff12d

38 files changed

+1031
-847
lines changed

blazor/gantt-chart/column-menu.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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

blazor/gantt-chart/how-to/customize-expand-collapse-icon.md

Lines changed: 44 additions & 53 deletions
Large diffs are not rendered by default.

blazor/gantt-chart/how-to/hide-chart-part.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ documentation: ug
1111

1212
In the Gantt Chart component, you can hide chart part and display Tree Grid part alone by setting the value of [GanttSplitterSettings.View](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Gantt.GanttSplitterSettings.html#Syncfusion_Blazor_Gantt_GanttSplitterSettings_View) property as `Grid`.
1313

14-
```cshtml
14+
{% tabs %}
15+
{% highlight razor tabtitle="Index.razor" %}
16+
1517
@using Syncfusion.Blazor.Gantt
1618
<SfGantt DataSource="@TaskCollection" Height="230px" Width="700px">
17-
<GanttTaskFields Id="TaskId" Name="TaskName" StartDate="StartDate" EndDate="EndDate" Duration="Duration" Progress="Progress" ParentID="ParentId">
19+
<GanttTaskFields Id="TaskID" Name="TaskName" StartDate="StartDate" EndDate="EndDate" Duration="Duration" Progress="Progress" ParentID="ParentID">
1820
</GanttTaskFields>
1921
<GanttSplitterSettings View="SplitterView.Grid"></GanttSplitterSettings>
2022
</SfGantt>
@@ -28,27 +30,27 @@ In the Gantt Chart component, you can hide chart part and display Tree Grid part
2830

2931
public class TaskData
3032
{
31-
public int TaskId { get; set; }
33+
public int TaskID { get; set; }
3234
public string TaskName { get; set; }
3335
public DateTime StartDate { get; set; }
3436
public DateTime EndDate { get; set; }
3537
public string Duration { get; set; }
3638
public int Progress { get; set; }
37-
public List<TaskData> SubTasks { get; set; }
39+
public int? ParentID { get; set; }
3840
}
3941

4042
private static List<TaskData> GetTaskCollection()
4143
{
4244
List<TaskData> Tasks = new List<TaskData>() {
43-
new TaskData() { TaskId = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 01, 04), EndDate = new DateTime(2022, 01, 23), },
44-
new TaskData() { TaskId = 2, TaskName = "Identify Site location", StartDate = new DateTime(2022, 01, 04), Duration = "4", Progress = 50, ParentId = 1, },
45-
new TaskData() { TaskId = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 01, 04), Duration = "4", Progress = 50, ParentId = 1, }
45+
new TaskData() { TaskID = 1, TaskName = "Project initiation", StartDate = new DateTime(2022, 01, 04), EndDate = new DateTime(2022, 01, 07), },
46+
new TaskData() { TaskID = 2, TaskName = "Identify Site location", StartDate = new DateTime(2022, 01, 04), Duration = "4", Progress = 50, ParentID = 1, },
47+
new TaskData() { TaskID = 3, TaskName = "Perform soil test", StartDate = new DateTime(2022, 01, 04), Duration = "4", Progress = 50, ParentID = 1, }
4648
};
4749
return Tasks;
4850
}
4951
}
50-
```
5152

52-
The following screenshot shows the output of the above code snippet.
53+
{% endhighlight %}
54+
{% endtabs %}
5355

54-
![Hiding Blazor Gantt Chart Part](../images/blazor-hide-gantt-chart-part.png)
56+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BjVetkLHARucneHx?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
-34.7 KB
Binary file not shown.
-39.9 KB
Binary file not shown.
-53.1 KB
Binary file not shown.
Binary file not shown.
-25.4 KB
Binary file not shown.
-37.2 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)