How to add a hyperlink in each row of the Blazor Gantt Chart

Answer:

We can add hyperlinks in columns by using a custom template.

<SfGanttId="GanttContainer"> 

<GanttColumns> 

   <GanttColumnField="Custom"Width="150"> 

      <Template> 

        @{ 

           var TaskData = (context as TaskData); 

           <div><arel='nofollow' href="#"@onclick="@(() => Navigate(TaskData))">View</a></div> 

         } 

     </Template> 

   </GanttColumn>   

   //… 

</GanttColumns> 

</SfGantt> 

 

@code{ 

  //... 

 privatevoid Navigate(TaskData Data) 

 { 

    UriHelper.NavigateTo($"Routing/{Data.TaskId.ToString()}/{Data.TaskName}"); 

 } 

} 


Find the sample to add a hyperlink in each row of the Gantt Chart from here.

Loader.
Up arrow icon