This is a migrated thread and some comments may be shown as answers.

Edit default template

2 Answers 65 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 21 Jul 2016, 12:16 PM
Hi, I wanted to know if there was a way to edit the default template for the tasks.I have explored client templates but you lose the percent complete functionality when you do this and I'd like to keep that. Specifically visually seeing the percent complete highlight as well as adjusting the percent complete by moving the slider. If there was a way to add custom text to the default task, that would be perfect. 

2 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 26 Jul 2016, 08:19 AM
Hello Sam,

Apart from using ClientTemplates custom text can be added to the task title, for example in the TaskInsert event handler as shown in this article.
Although not a recommended approach, HTML elements can be added to the Task's content div with jQuery for example:
$telerik.$( ".rgtTaskContent" ).append( "<p>Test</p>" );


Regards,
Ivan Danchev
Telerik by Progress
0
Sam
Top achievements
Rank 1
answered on 26 Jul 2016, 09:16 PM
Ivan, thanks for the post. Unfortunately the link you provided would change the actual title of the task. I only want to display additional information and not change the task itself. Also, it doesn't support adding html (another requirement I need). I did end up using Jquery to add custom text. I'm sure it will come back to bite me at some point since it feels more like a hack to get what I need in there but hopefully the HTML structure of the Gantt won't change anytime soon. Thanks. 
Tags
Gantt
Asked by
Sam
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Sam
Top achievements
Rank 1
Share this question
or