Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145725 | Jul 5,2019 08:41 AM UTC | Sep 24,2019 05:15 AM UTC | Vue | 14 |
![]() |
Tags: Gantt Chart |
<template>
<div>
<ejs-gantt ref='gantt' :dataSource="data" :contextMenuItems="contextMenuItems"
:enableContextMenu="true" :contextMenuClick="contextMenuClick">
//...
</ejs-gantt>
</div>
</template>
<script>
export default {
return {
//...
contextMenuItems: [
//…
{ text: "Edit Cell", target: ".e-content", id: "editCell" },
],
methods:{
contextMenuClick:function (args) {
var obj = this.$refs.gantt.ej2Instances;
var index = obj.flatData.indexOf(args.rowData);
if (args.item.id === 'editCell') {
obj.treeGrid.editCell(index, 'TaskName')
}
}
}
};
</script> |
actionComplete(args) {
if (args.action === 'add') {
const ganttInstance = getGanttInstance();
var index = ganttInstance.currentViewData.indexOf(args.data);
setTimeout(() => {
ganttInstance.treeGrid.editCell(index, 'TaskName');
}, 50);
} |
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"postinstall": "xcopy patches node_modules /s /y"
}, |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.