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

How to calculate the percents of the parent tasks?

3 Answers 46 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Marcos
Top achievements
Rank 1
Marcos asked on 26 Jan 2015, 02:25 PM
Hi folks,

I need compute the percentual of my parents tasks according to the children tasks.
Exists a client method for this?

tks.

ps.
sry my bad english.

best regards.

3 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 29 Jan 2015, 08:04 AM
Hello,

The percentComplete value of each parent is automatically calculated on each interaction with the gantt, for instance changing the percentComplete value of a child, or adding/removing child tasks. There is however no public method for calculating this value statically from the initial state of the gantt. If you are loading data, where only the child tasks have this property set, you will have to manually set the parents values as well.

Regards,
Bozhidar
Telerik
0
Marcos
Top achievements
Rank 1
answered on 03 Feb 2015, 02:45 PM
So, why are not calculating on databinding?

ps.
I'm not using dependency between taks.

0
Bozhidar
Telerik team
answered on 04 Feb 2015, 07:15 AM
Hi,

The Gantt control expects all of the underlying data to be in correct format and doesn't do any modifications to it upon databinding. Once the data is in correct format, the Gantt will do the necessary calculations when you edit, add or remove tasks so that it stays correct.

Doing any kind of modifications upon databinding by the control itself will effectively show different information than what was passed to it from the datasource, which will be confusing, and that's why it's not supported.

Regards,
Bozhidar
Telerik
Tags
Gantt
Asked by
Marcos
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Marcos
Top achievements
Rank 1
Share this question
or