Allowing to drag, but not to edit duration

Hello,

I'm trying to make my tasks draggable(and droppable), but not resizable. With 'allowGanttChartEditing' property to false it disables any behaviour, but I want to let the user drag and drop the tasks. Any way to do this?

Thanks.

5 Replies

PE Punniyamoorthi Elangovan Syncfusion Team May 4, 2018 01:14 PM UTC

Hi Oscar, 
Thank you for contacting Syncfusion support. 
We have analyzed your requirement. We can achieve your requirement by using taskbarEditing client side event. It is necessary to set the allowGanttChartEditing value as true for drag and drop the taskbar in Gantt chart side. Please refer the below code snippet. 
<script type="text/javascript"> 
         taskbarEditing: function (args) { 
                    if (args.leftResizing == true || args.rightResizing == true || args.progressResizing == true) 
                        args.cancel = true 
                }, 
</script> 
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, 
Punniyamoorthi 



OB oscar bartolome May 7, 2018 09:53 AM UTC

Thanks it works fine, but the cursor changes as if it is possible to edit it. Any way to avoid this?
Also I want not to let creating new dependencies. Which is the args property to do this?

Thanks.



PE Punniyamoorthi Elangovan Syncfusion Team May 8, 2018 01:57 PM UTC

Hi Oscar, 
Thank you for your update 
We have analyzed your requirement. We have disabled the dependency line draw option using the actionBegin  client side event and we have changed the cursor when resizing the taskbar. Please refer the below code snippet. 
<style> 
.e-gripper{ 
           cursor:pointer !important 
       } 
   </style> 
 
actionBegin: function (args) { 
          if(args.requestType=="drawConnectorLine") 
                      args.cancel = true 
                }, 
 
We have prepared the JS Playground sample for your reference please find the sample link below 
Please let us know if you require further assistance on this 
Regards, 
Punniyamoorthi 



OB oscar bartolome May 8, 2018 03:03 PM UTC

It works fine, but the pointer and the two black points to join the dependencies still appear. Is there any way not to show them?

Thanks


PE Punniyamoorthi Elangovan Syncfusion Team May 9, 2018 01:44 PM UTC

Hi Oscar,  
Thank you for your update  
As per your requirement we have hidden the dependency line connecter points from the Gantt taskbar. Please refer the below code snippet. 
<style> 
     .e-taskbarresizer-left ,.e-taskbarresizer-right{ 
      display:none 
    } 
    .e-connectorpoint-left, .e-connectorpoint-hover ,.e-progressbarresizer-right{ 
       display:none 
    } 
 
   </style> 
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, 
Punniyamoorthi 


Loader.
Up arrow icon