Hi Hasan,
Thanks for using Syncfusion products.
In the Gantt control, the percentage of the parent task item is calculated based on the duration and percentage of its total child task items, which is the behavior of the Gantt chart. But we would also like to let you know that, you can also customize your percentage value of the parent task item of the Gantt control. We have prepared a workaround sample using “Load” client side event for changing the values of the parent task item.
Please refer the below code snippets for more details.
Code snippets:
<body> <form id="form1" runat="server" onsubmit="return false" style="overflow: hidden; padding:0; margin: 0;height:100%;width:100%;"> <ej:Gantt ID="Gantt" runat="server" Load="Load" //... ej:Gantt> <script type="text/javascript"> function Load(args) { var totalParentRecords = args.model.parentRecords.length, parentItems = args.model.parentRecords; for (var i = 0; i < totalParentRecords; i++) { if (parentItems[i].taskId == 1) parentItems[i].status = "50"; if (parentItems[i].taskId == 5) parentItems[i].status = "56"; if (parentItems[i].taskId == 10) parentItems[i].status = "46"; } } </script> </form> </body> |
We have prepared a sample based on this. Please find the sample in the following location.
Please let us know if you need further assistance on this.
Regards,
John. R
Hi Hasan,
Thanks for the update.
Please let us know, if you require any further assistance on this.
Regards,
John. R