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
close icon

Not showing options to edit

Hi,

I want to disable editing for a specific task and I can achieve it by set cancel to true in taskbarEditing event. But when I hover the mouse over this task, it shows "editing tools". How can I not show it?



Best regards,
Tomasz Tomczykiewicz

3 Replies

JA Jesus Arockia Sankaran S Syncfusion Team July 5, 2019 08:56 AM UTC

Hi Tomasz, 
 
We can prevent taskbar editing element when hover on it by following work-around. In Gantt, we have a client-side event called queryTaskbarInfo which will be triggered whenever the taskbar changes. By using this event, we can change the CSS styles to prevent the taskbar editing element. 

Please find the code example below. 
<template> 
    <div> 
        <ejs-gantt ref='gantt' :dataSource="data" id="GanttContainer" 
            :queryTaskbarInfo="queryTaskbarInfo"> 
        </ejs-gantt> 
    </div> 
</template> 
<script> 
  export default { 
     methods:{ 
      queryTaskbarInfo:function (args) { 
        if (args.data.TaskID == 3) { 
          args.taskbarElement.id = 'preventEdit' 
        } 
    } 
  } 
  }; 
</script> 
 
<style> 
    #preventEdit 
    { 
        cursor: auto !important 
    } 
 
    .e-gantt-chart #preventEdit .e-right-resize-gripper, 
    .e-gantt-chart #preventEdit .e-left-resize-gripper, 
    .e-gantt-chart #preventEdit .e-progress-resize-gripper, 
    .e-gantt-chart #preventEdit .e-left-connectorpoint-outer-div, 
    .e-gantt-chart #preventEdit .e-right-connectorpoint-outer-div 
      { 
        display: none; 
    } 
</style> 
 
Please find the below sample link. 
 
Please get back to us if you require further assistance on this. 
 
Regards, 
Jesus Arockia Sankaran S 



TT Tomasz Tomczykiewicz July 5, 2019 09:35 AM UTC

Thank you, it solved my problem.

Best regards,
Tomasz Tomczykiewicz


JA Jesus Arockia Sankaran S Syncfusion Team July 5, 2019 09:58 AM UTC

Hi Tomasz, 

Thanks for you update. 

Please get back to us if you need any further assistance. 

Regards, 
Jesus Arockia Sankaran S 


Loader.
Live Chat Icon For mobile
Up arrow icon