We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Overriding task progress of gantt with custom

Currently Gantt calculate parent task progress according to its child task. But i want assign progress to every level task on the basis of calculation done by us(according to our logic).

How can i override gantt calculation for progress?


1 Reply

JS Jonesherine Stephen Syncfusion Team March 13, 2017 07:07 PM UTC

Hi Nivedita, 
During load time we can render Gantt with custom progress logic by using “load” and create client side event. Using actionComplete client side event we can update custom progress on add/edit/delete action. 
Please find the code example below: 
actionComplete: function (args) { 
                    //To update the parent fields on edit action 
                    if (args.requestType == "recordUpdate" && !progressEdit) {                        
                    //To update the parent fields on add action 
                    if (args.requestType == "save" && args.addedRecord) {                         
                    //To update the parent fields on delete action 
                    if (args.requestType == "delete") { 
      function update(parentItem) {           
            if (parentItem != null) { 
                //custom logic for parent item 
              parentItem.status = Math.round(parentItem.status +2); 
              parentItem.progressWidth = (parentItem.width * parentItem.status) / 100; 
              var ganttObj = $("#GanttContainer").data("ejGantt"); 
              treeGridObj = ganttObj._$treegridHelper.data("ejTreeGrid"); 
              ganttChartObj = ganttObj._$ganttchartHelper.data("ejGanttChart"); 
                return update(parentItem.parentItem); 
We have prepared the sample and rendered Gantt with custom progress. Please find the sample from below location 
If you are facing any issues while rendering Gantt with your custom progress logic kindly revert us with your exact requirement. This would be helpful for us to serve you better. 
Jone sherine P S 

Live Chat Icon For mobile
Up arrow icon