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

How to disable change taskbar duration by dragging

Hi,

I want to disable change taskbar duration by dragging but keep enabling change date by dragging.
Please let me know if it is possible.


Just for reference:
Taskbar Editing

Thanks in advance,

Ryosei

5 Replies

SD Saranya Dhayalan Syncfusion Team October 18, 2019 06:33 AM

Hi Ryosei, 
 
Thank you for contacting Syncfusion support 
 
By using taskbarediting event we can restrict the duration update on resizing. We can set args.cancel as true when taskbarEditAction is LeftResizing or RightResizing. 
We can also hide taskbar resizing element by over-riding the CSS. 
 
Please find the below code example. 
 
<style> 
      .e-gantt-chart .e-taskbar-right-resizer.e-icon.e-right-resize-gripper, 
      .e-gantt-chart .e-taskbar-left-resizer.e-icon.e-left-resize-gripper 
      { 
        display: none; 
      } 
</style> 
        export class Editing extends SampleBase { 
            //... 
            taskbarEditing(args) { 
                if (args.taskBarEditAction == "LeftResizing" || args.taskBarEditAction == "RightResizing") { 
                    args.cancel = true 
                } 
            } 
            render() { 
                return (<div className='control-pane'> 
                 <GanttComponent id='Editing' dataSource={editingData} 
                            taskbarEditing={this.taskbarEditing.bind(this)}> 
                        //... 
                        </GanttComponent> 
                </div>); 
            } 
        } 
 
For your convenience we have prepared a sample. Please find the below sample link.  
 
 
Could you please check the above sample and get back to us if you need further assistance on this? 
 
 
Regards, 
Saranya D 



RY Ryosei Yawata October 26, 2019 12:43 AM

Hi Saranya,

Thank you for quick response and sample code in detail.

Could you tell me class name to hide Connector point as well?
It's also okay that just let me know the document URL getting the info.

Best Regards,

Ryosei


JS Jonesherine Stephen Syncfusion Team October 28, 2019 02:41 PM

Hi Ryosei, 
 
Using ‘e-left-connectorpoint-outer-div’ and ‘e-right-connectorpoint-outer-div’ we can hide the connector point in Gantt taskbar. 
Please find the code example below: 
<style>       
      .e-gantt-chart .e-left-connectorpoint-outer-div, 
      .e-gantt-chart .e-right-connectorpoint-outer-div 
      { 
        display: none !important; 
      } 
</style> 
We have also prepared the sample based on this. Please find the sample from below location 
 
Please let us know if you need further assistance on this. 
Regards, 
Jone sherine P S 



RY Ryosei Yawata October 28, 2019 07:11 PM

Hi Joensherine,

Thank you!It works.

Regards,

Ryosei


PP Pooja Priya Krishna Moorthy Syncfusion Team October 29, 2019 11:21 AM

Hi Ryosei, 
 
Thanks for the update. Please get back to us if you require further assistance on this. 
 
Regards, 
Pooja Priya K. 


Loader.
Live Chat Icon For mobile
Up arrow icon