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

Context menu example

Hi,

Could you provide an example of how to use a context menu in the Gantt chart? There is no section of this issue in the documentation.

Best regards,
Tomasz Tomczykiewicz

5 Replies

JA Jesus Arockia Sankaran S Syncfusion Team July 4, 2019 11:55 AM UTC

Hi Tomasz, 
 
We have prepared a default context menu sample. To enable context menu in Gantt, we need to set enableContextMenu as true and import ContextMenu class.  
 
Please find the code example below. 
 
 
<template> 
  <div> 
    <ejs-gantt ref='gantt' :dataSource="data" id="GanttContainer" :enableContextMenu="true"  
      :editSettings="editSettings"> 
        //... 
    </ejs-gantt> 
  </div> 
</template> 
<script> 
  import Vue from "vue"; 
  import { GanttPlugin, Edit, Selection, ContextMenu } from "@syncfusion/ej2-vue-gantt"; 
  Vue.use(GanttPlugin); 
  export default { 
    provide: { 
      gantt: [Edit, Selection, Toolbar, ContextMenu] 
    }, 
  }; 
</script> 
 
 
Context menu UG documentation will be publish in our upcoming volume 2, 2019 main release which is expected to be roll-out in the mid of July 2019. 
Please find the below sample link. 
 
Regards, 
Jesus Arockia Sankaran S 



TT Tomasz Tomczykiewicz July 4, 2019 01:03 PM UTC

Hi,

Thanks for the example. Is ContextMenu to inject available only in 17.2.28-beta version? I have 17.1.49 and I cannot import it.

Best regards,
Tomasz Tomczykiewicz



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

Hi Tomasz, 
 
Thanks for contacting Syncfusion. 
 
Context menu support is available only from 17.2.28-beta version. Please delete @syncfusion packages from node modules and package-lock.json from your project. And run the command ‘npm install @syncfusion/ej2-vue-gantt@17.2.28-beta’ to install new packages. 
 
Please get back to us if you require further assistance on this. 
 
Regards, 
Jesus Arockia Sankaran S 



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

Thanks.

Best regards,
Tomasz Tomczykiewicz


JA Jesus Arockia Sankaran S Syncfusion Team July 5, 2019 09:59 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