Show title in the summary tasks

3 posts, 1 answers
  1. Maksym
    Maksym avatar
    9 posts
    Member since:
    Apr 2015

    Posted 22 Jul 2015 Link to this post

    Hi,

    Is it possible to show title in the summary tasks?

     

    Thanks

  2. Answer
    Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 24 Jul 2015 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Maksym
    Maksym avatar
    9 posts
    Member since:
    Apr 2015

    Posted 24 Jul 2015 Link to this post

    Thanks!
Back to Top