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

Show title in the summary tasks

2 Answers 61 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Maksym
Top achievements
Rank 1
Maksym asked on 22 Jul 2015, 03:05 PM

Hi,

Is it possible to show title in the summary tasks?

 

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Bozhidar
Telerik team
answered on 24 Jul 2015, 07:51 AM
Hi,

You can use the following code to insert the task title into the summary elements:
function pageLoad() {
    $ = $telerik.$;
    var gantt = $find("RadGantt1");
 
    gantt._widget.bind("dataBound", function() {
        colorTasks();
    });
 
    colorTasks();
}
 
function colorTasks() {
    var gantt = $find("RadGantt1");
    var tasks = gantt.get_allTasks();
 
    for (var i = 0; i < tasks.length; i++) {
        var task = tasks[i];
 
        if (task.get_summary()) {
            var taskElement = $(gantt.get_element()).find(".rgtTimelineContent .rgtTask[data-uid='" + task._uid + "']");
 
            taskElement.find(".rgtComplete").text(task.get_title());
        }
    }
}

You will have to add some CSS to style the text as per your requirements.

Regards,
Bozhidar
Telerik
0
Maksym
Top achievements
Rank 1
answered on 24 Jul 2015, 03:51 PM
Thanks!
Tags
Gantt
Asked by
Maksym
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Maksym
Top achievements
Rank 1
Share this question
or