This is a migrated thread and some comments may be shown as answers.
Task dependency and UI issues.
10 Answers 181 Views
This is a migrated thread and some comments may be shown as answers.
Piotr
Top achievements
Rank 1
Piotr asked on 26 Sep 2014, 11:42 AM
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?


 

10 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 30 Sep 2014, 08:00 AM
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!
 
0
Piotr
Top achievements
Rank 1
answered on 30 Sep 2014, 03:03 PM
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();
  }
}
0
Bozhidar
Telerik team
answered on 01 Oct 2014, 07:37 AM
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!
 
0
Piotr
Top achievements
Rank 1
answered on 01 Oct 2014, 08:14 AM

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
0
Piotr
Top achievements
Rank 1
answered on 01 Oct 2014, 08:18 AM
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
0
Bozhidar
Telerik team
answered on 02 Oct 2014, 07:23 AM
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!
 
0
Piotr
Top achievements
Rank 1
answered on 14 Apr 2015, 10:14 AM

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

0
Bozhidar
Telerik team
answered on 15 Apr 2015, 07:19 AM
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!
 
0
aman
Top achievements
Rank 1
answered on 25 Aug 2016, 08:38 PM
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
0
Bozhidar
Telerik team
answered on 29 Aug 2016, 06:35 AM
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
Tags
Gantt
Asked by
Piotr
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Piotr
Top achievements
Rank 1
Piotr
Top achievements
Rank 1
aman
Top achievements
Rank 1
Share this question
or