<script type="text/x-jsrender" id="taskbarTemplate"> <div class="e-gantt-template-taskbar bg-color" style="border-radius:5px;overflow:hidden;-webkit-transform:translateZ(0);-webkit-mask-image: -webkit-radial-gradient(circle, white, black);"> <div> {{if #data['resourceNames']}} <img style="position:relative;top:8px;left:4px;text-align:left;z-index:1;" height="32" width="32" src="../images/gantt/{{:#data['resourceNames']}}.png" />
I want to use as described in
https://www.syncfusion.com/kb/2723/how-to-create-a-custom-tooltip-template-in-gantt
@(
Html.EJ().Gantt("gantt")
// ...
.TaskbarTooltipTempate(“<
table
><
tbody
><
tr
><
td
>BuildStage :</
td
><
td
>
{{:~_stageName()}}
</
td
> </
tr
></
tbody
></
table
>”)
// ...
)
<
script
type=”text/javascript”>
$.views.helpers({_stageName: getStageName });
&a
SIGN IN To post a reply.
[view]
@(Html.EJ().Gantt("GanttContainer").
.TaskbarTemplate("#taskbarTemplate")
.ParentTaskbarTemplate("#parentTaskbarTemplate")
.MilestoneTemplate("#milestoneTemplate")
)
@(Html.EJ().ScriptManager())
<script type="text/x-jsrender" id="taskbarTemplate">
{{if #data['resourceNames']}}
<img style="position:relative;top:8px;left:4px;text-align:left;z-index:1;" height="32" width="32" src={{:#data.item.ImagePath}}/>
//…
</script>
[controller]
tasks[0].SubTasks[0].SubTasks.Add(new TaskDetails()
{
//
ResourceID = new List<object>() { 1 },
ImagePath = "Content/gantt/folder1/Robert King.png"
}); |