Editing parent task start and end date

Hello,
I want to have a possibility to edit start and end date of the task called "zadanie12" and also not bold the whole row. How can I achieve this?

Attachment: parent_task_fa526075.zip

3 Replies

JR John Rajaram Syncfusion Team August 30, 2018 10:17 AM UTC

Hi Michal, 
Thank you for contacting Syncfusion support. 
We have analyzed your requirement and attached image. In Gantt there is no support to edit the startDate and endDate of the parent task, but we can remove the bold highlighting of the parent task in Gantt by customizing the parent row with CSS property. Please refer the below code snippets. 
<head> 
     <style> 
       .e-treegridrows .e-rowcell { 
           font-weight: normal !important; 
       } 
   .e-taskbarname{ 
        font-weight: normal !important; 
     } 
     </style> 
</head> 
We have prepared the sample for your reference please find the sample link below 
Please let us know if you require further assistance on this.  
Regards,  
John R 



MD Malgorzata Dobkowska August 30, 2018 02:11 PM UTC

Hi John,

Thank you for your response. I think that we misunderstood each other. I want to have bold task named 'faza1' and not bold 'zadanie12'.

Best regards


JR John Rajaram Syncfusion Team August 31, 2018 10:37 AM UTC

Hi Michal, 
Thanks for you update. Please find the below details. 
Query1: I want to have bold task named 'faza1' and not bold 'zadanie12'. 
Answer: We have checked your requirement. In Gantt we can remove the bold highlighting of the specific parent task by using rowDataBound client side event. Please refer the below code snippet. 
<script type="text/javascript"> 
    $(function () { 
            var data = projectData; 
             rowDataBound: function (args) { 
                    if (args.data.item.id == "5") { 
                        $(args.rowElement).find(".e-rowcell ").css("font-weight", "normal"); 
                    } 
                }, 
             //.. 
        }); 
     }); 
 </script> 
Also we can remove the bold highlighting for the specific parent row by using queryCellInfo client side event. Please refer the below code snippet regarding this. 
$(function () { 
            var data = projectData; 
            queryCellInfo: function (args) { 
                   if (args.cellValue == "zadanie12") { 
                          $(args.cellElement).find(".e-cell ").css("font-weight", "normal"); 
                    } 
                }, 
                 //.. 
            }); 
     }); 
 </script> 
 
You can follow any one of the above method. We have also prepared the sample for your reference please find the sample link below 
Query2: I want to have a possibility to edit start and end date of the task called "zadanie12" 
Answer: We can achieve this requirement by using Task Schedule Mode support. In Gantt, we have three schedule modes Auto, Manual and Custom. Here “Auto” is default for Gantt.  
If you are in need of editing start and end date of parent task, you can go with “Manual” schedule mode. Because in “Manual” schedule mode we have the support for dragging the parent taskbar. To enable this support, we need to set “TaskSchedulingMode” property as “Custom”. Please find more details here. 
As said earlier, in manual schedule mode we can edit the start and endDate of the parentTask. If we change the startDate of the parent task, then the child tasks are adjusted based on the parentTask. Please find below document and demo link for TaskSchedulingMode in Gantt. 
We have prepared the sample for your reference please find the sample link below.  
Please let us know if you require further assistance on this. 
Regards, 
John R 


Loader.
Up arrow icon