Task dependency and UI issues.

11 posts, 0 answers
  1. Piotr
    Piotr avatar
    14 posts
    Member since:
    Jul 2014

    Posted 26 Sep 2014 Link to this post

    Hi

    i have at least two entirely different asks towards gantt chart functionality. First question concern an UI intereface. I've loaded regional (cultureinfo) custom preferences - 

    <script src="Scripts/cultures/kendo.culture.pl-PL.min.js"></script>
    <script type="text/javascript">
    //set current to the "pl-PL" culture script
    kendo.culture("pl-PL");
    </script>

    and this great works with one exception, and that's why i'd like to enquire how to change description upon a buttons (data-views). I didn't found any suggestions in this case, and my code looks like:

    data-views="[ 'day', 'week', { type: 'month', selected: true }]"



    and data-views has no any additional properties/values, but i need to change text on a button (for example: Month display in Polish like "Miesiąc") How to do this?

    The second issue concern a dependency case. In example if particular tasks are in scope of the same parent task object, then resize or drag operations has direction impact on the other child tasks. I'd like to achieve similar functionality on the threshold between an end of previous and beginning of very next task. As a conclusion i'd like to enforce change on task that is dependent (ID 188) of the other as a Successor with dependency type [Finish-Start] (ID 187).

    {"ID":75,"PredecessorID":186,"SuccessorID":187,"Type":1},{"ID":76,"PredecessorID":187,"SuccessorID":188,"Type":1}

    Otherwise it looks a kind of weird when a finish of a previous operation is further in timeline that the next. Is it possible?


     

  2. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 30 Sep 2014 Link to this post

    Hi Piotr,

    You can use the messages option to set the text for the headers:
    http://docs.telerik.com/kendo-ui/api/javascript/ui/gantt#configuration-messages.views

    Here's a sample of the Month header changed to Polish:
    http://dojo.telerik.com/oBOL

    These messages have to be set by default by the culture, and we will fix this for our next official release.

    As for your second question, you can use the save​ event to handle when a task is updated, and manually adjust the related tasks.
    http://docs.telerik.com/kendo-ui/api/javascript/ui/gantt#events-save

    The dependencies datasource offers helpful methods to find the predecessors and successors of a specific task:
    http://docs.telerik.com/kendo-ui/api/javascript/data/ganttdependencydatasource#methods-successors

    Regards,
    Bozhidar
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Piotr
    Piotr avatar
    14 posts
    Member since:
    Jul 2014

    Posted 30 Sep 2014 in reply to Bozhidar Link to this post

    Hi

    thanks for reply, and i need to admit that was really helpful in my case. But one more simple thing still persist, and is necessary to solve my issue in hundred percent. I need to somehow recognize what field exactly was a change. During a studying documentation i've found something like e.value for save event:

    e.value ObjectThe GantTask fields being updated with new values.

    But despite that rest of my code has successfull, this only one piece return an undefined. And i have no idea why.

    onSave: function(e) { 
    var gantt = e.sender;
    var dataSource = gantt.dependencies;
    alert(e.value);
      var _siblings = dataSource.successors(e.task.id);    
        if (_siblings.length > 0) {
    for (i=0; i < _siblings.length; i++) {
    var _children = _siblings[i];
    var _task = gantt.dataSource.get(_children.successorId);
    _task.set("percentComplete", 0.5);
    gantt.dataSource.sync();
      }
    }
  5. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 01 Oct 2014 Link to this post

    Hi,

    Please review the following dojo sample, which works fine on my end:
    http://dojo.telerik.com/ovep/2

    Note that you don't have to call the datasource sync() method, as it's called after the save event by the gantt itself.

    Regards,
    Bozhidar
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Piotr
    Piotr avatar
    14 posts
    Member since:
    Jul 2014

    Posted 01 Oct 2014 Link to this post


    onSave: function(e) { 
    var gantt = e.sender;
    var dataSource = gantt.dependencies;
    if (!Array.prototype.last){
        Array.prototype.last = function(){
            return this[this.length - 1];
        };
    };
    if (!e.task.summary) {
      var _siblings = dataSource.successors(e.task.id);    
        if (_siblings.length > 0) {
    for (i=0; i < _siblings.length; i++) {
    var _children = _siblings[i];
    var _task = gantt.dataSource.get(_children.successorId);
    _task.set("start", e.task.end);
    //gantt.dataSource.sync();
      }
    }
    }
    else {
    var _current = gantt.dataSource.taskChildren(e.task).last();
    var _siblings = dataSource.successors(_current.id);
    if (_siblings.length > 0) {
    for (i=0; i < _siblings.length; i++) {
    var _children = _siblings[i];
    var _task = gantt.dataSource.get(_children.successorId);
    alert(e.value);
    _task.set("start", _current.end);
      }
    }

    }
    },    

    And lack of value changed affecting entire functionality, cause i can't set properly values, especially in example within summary tasks when in first step i'm getting the last task (where parent is current) and its end date and very next set as a start date in child. But e.value still retrieve "undefined". Please help
  7. Piotr
    Piotr avatar
    14 posts
    Member since:
    Jul 2014

    Posted 01 Oct 2014 in reply to Bozhidar Link to this post

    Ok so the problem was in documentation :) - http://docs.telerik.com/kendo-ui/api/javascript/ui/gantt#events-save

    There is mention about e.value not e.values property
  8. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 02 Oct 2014 Link to this post

    Hello,

    Thank you for noticing that. We will update the documentation. 

    Regards,
    Bozhidar
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  9. Piotr
    Piotr avatar
    15 posts
    Member since:
    Feb 2015

    Posted 14 Apr 2015 in reply to Bozhidar Link to this post

    Hi, I don't want to create new topic so I ask here. Can you tell me there is a way to change date pattern in columns in Gantt chart? The problem is that "ABBR.DAYNAME MONTH/DAY" is not polish format. The correct format is "ABBR.DAYNAME DAY/MONTH" but i can change this. I tried to modify pl-PL culture:

                            patterns: {

                                d: "yyyy-MM-dd",
                                D: "d MMMM yyyy",
                                F: "d MMMM yyyy HH:mm:ss",
                                g: "yyyy-MM-dd HH:mm",
                                G: "yyyy-MM-dd HH:mm:ss",
                                m: "d MMMM",
                                M: "d MMMM",
                                s: "yyyy'-'MM'-'dd'T'HH':'mm':'ss",
                                t: "HH:mm",
                                T: "HH:mm:ss",
                                u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
                                y: "MMMM yyyy",
                                Y: "MMMM yyyy"
                            },

    but still the date is in incorrect format. Can you help me?
    Regards

  10. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 15 Apr 2015 Link to this post

    Hello,

    Since your question is not related to the topic of this forum thread, I would like to ask you to open a new thread and post your inquiry there. That way people with similar issues can find the relevant discussion more easily, and we will avoid long and confusing threads.

    Regards,
    Bozhidar
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  11. aman
    aman avatar
    1 posts
    Member since:
    Aug 2016

    Posted 25 Aug Link to this post

    Sir I am new for kendo ui.iam creating the gantt chart and I am facing the problem for ui(design), for every row(<td>) automatic take symbol A^ and rows overflow means scroll bar not come. Please help to solved this issue
  12. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 29 Aug Link to this post

    Hello,

    Can you reproduce the issue with the latest version of the widget and styles, or on our dojo site?
    http://dojo.telerik.com/

    Regards,
    Bozhidar
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     

    199302
Back to Top
Kendo UI is VS 2017 Ready