Prevent automatic update of parent task values in the gantt grid



I have the following situation on the gantt chart:

When I change the estimated time for the ‘Subtask’ task, the estimated time for the parent of that task is automatically changed as well. For projects I don’t mind this, but for the parent task ‘Top task’ I would need to prevent this from happening. I know that I can use something like this to change the value manually, when the grid line is redrawn:

{name: ‘estimated’, label: ‘Estimated time’, width:68, align: ‘center’, resize: true, editor: estimatedEditor,
template: (task) => {
return xxx;

However the estimatedEditor is mapped to the estimated_hours value (task.estimated_hours) and when the template function is called for the ‘Top task’, this value is already changed - this means I can’t really find out how it was changed, prevent the change and return the old value. Is there some simple way how to achieve this?

Thank you very much



Hello Ondrej,
Gantt doesn’t watch custom properties, so it depends on the logic that you use and the Gantt configuration.
I have the following example where a custom property(money) is added for each task. For project tasks, that value is calculated, but you can manually change it, and then Gantt won’t calculate it:

If that doesn’t help you, please, add your Gantt configuration in the following snippet and make sure that the issue is reproduced there:
Then, click on the Share button and send me the link.
Or send me a ready demo with all the necessary Javascript and CSS files so that I can reproduce the issue locally.


Hi Ramil,

thank you very much for your answer. Let’s continue with your example:

I just added inline editor for money. When you first load the page (and the gantt), after first render everything works correctly, i.e. projects have the right money value (calculated as a sum of all the money values of their children). However when I change the value of one of the child tasks (e.g. Task #1), value of the parent is not recalculated, because the code in the anonymous template function is not triggered. It doesn’t matter if I change the money value using the lightbox or the inline editor.

So my question is: when I’m using this manual calculation of the project money value, what would be the best procedure to update this value in case one of the child tasks is changed?

Thank you very much



Hello Ondrej,
Sorry, I forgot to remove a part of the code that assigns the money property.

When you change the money property from the lightbox, then click on the Save button, Gantt repaints all visible tasks, and that includes parent tasks.
If you do that with the inline editor, you need to manually repaint parent tasks. The easiest way to do that is to use the onSave event handler:
Here is the updated snippet:


Hi Ramil,

thank you for your help. It worked.

Have a nice day