Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions blazor/gantt-chart/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Most templates used in the Gantt Chart are of type `RenderFragment<T>` and are p

For example, the data in a column template can be accessed using `context` as shown below:

```razor
```cshtml
<GanttColumn Field="TaskName" HeaderText="Task">
<Template Context="context">
@context.TaskName
Expand All @@ -34,4 +34,4 @@ For example, the data in a column template can be accessed using `context` as sh

In Blazor, when a component includes a `RenderFragment` property, it restricts the use of other child components outside that fragment. This is a framework-defined behavior [by design in Blazor](https://github.com/dotnet/aspnetcore/issues/10836), which prevents placing additional child components directly within the parent component.

Due to this limitation, templates such as `TaskbarTemplate` and `MilestoneTemplate` cannot be declared directly under the Gantt Chart component. Instead, they must be wrapped inside a `GanttTemplates` component to ensure proper structure and rendering.
Due to this limitation, templates such as `TaskbarTemplate` and `MilestoneTemplate` cannot be declared directly under the Gantt Chart component. Instead, they must be wrapped inside a `GanttTemplates` component to ensure proper structure and rendering.