We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can I create a custom taskbar template like tooltip template.

Thread ID:





127698 Dec 3,2016 07:05 PM UTC Dec 6,2016 04:57 AM UTC ASP.NET MVC 3
Tags: Gantt
Asked On December 3, 2016 07:05 PM UTC


I am trying to use taskbar template to display task resource pictures within taskbar.
According to the demo I can only use some static url for images.
I want to use different url's for different users.
 resoure 1: 
image url : ..\images\users\xxxx.jpg
resource 2:
url: ..\images\users\contractors\yyyyy.jpg

instead of using the standard way described in demo like below: 
<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);">
            {{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 
        // ...
       .TaskbarTooltipTempate(“<table><tbody><tr><td>BuildStage :</td><td>{{:~_stageName()}}</td> </tr></tbody></table>”)
      // ...
<script type=”text/javascript”>
$.views.helpers({_stageName: getStageName });   

Jonesherine Stephen [Syncfusion]
Replied On December 5, 2016 11:55 AM UTC

Hi Renu, 
Thanks for contacting Syncfusion support. 
We can refer different image path while rendering custom taskbar template. 
We have prepared the work around and provided the required image path in a separate field and referred that path in taskbar template. 
Please find the code example below: 
    <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}}/> 
            tasks[0].SubTasks[0].SubTasks.Add(new TaskDetails() 
                ResourceID = new List<object>() { 1 }, 
                ImagePath = "Content/gantt/folder1/Robert King.png" 
We have also prepared the sample based on this, please find the sample from below location 
Disclaimer: We have removed bin and obj folder in the given sample for some security reasons, we must include Syncfusion.EJ, Syncfusion.EJ.MVC, dlls to render the Gantt control which is available in Essential Studio installed location.   
Jone sherine P S 

Replied On December 5, 2016 04:50 PM UTC

Hi Jone sherine,

That's what I am looking for.
Thank you.


Jonesherine Stephen [Syncfusion]
Replied On December 6, 2016 04:57 AM UTC

Hi Renu, 
Thanks for your update 
Please let us know if you need further assistance on this, 
Jone sherine P S 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon