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

Edit cell after adding

Hi,

I want to edit a specific cell (for example a name cell) after adding a new row by context menu. How can I achieve this?

Best regards,
Tomasz Tomczykiewicz

14 Replies

PP Pooja Priya Krishna Moorthy Syncfusion Team July 8, 2019 12:02 PM UTC

Hi Tomasz, 
 
In Gantt, this can be achieve by using cellEdit method of TreeGrid instance, we have prepared a sample and make TaskName cell as editable while clicking on custom menu item in context menu. 
Please find the code example below. 
 
 
<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> 
 
Please find the below sample link. 
 
Regards, 
Pooja Priya K 



TT Tomasz Tomczykiewicz July 10, 2019 10:06 AM UTC

Hi,

Thanks for the response, it was helpful.
Unfortunately, I have a new problem. When I try to edit a cell after adding it, I have a focus on a different cell. I attached a simple example.

Best regards,
Tomasz Tomczykiewicz

Attachment: ganttinlineadd_bbea3e00.zip


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

Hi Tomasz, 
 
Thanks for your response.  
 
As we said in the previous update, we need to find the index of newly added record from currentViewData collection. The index that is found from the currentViewData collection should be passed to editCell method of TreeGrid. 
 
Please find the below code example. 
 
actionComplete(args) { 
    if (args.action === 'add') { 
        const ganttInstance = getGanttInstance(); 
        var index = ganttInstance.currentViewData.indexOf(args.data); 
        setTimeout(() => { 
            ganttInstance.treeGrid.editCell(index, 'TaskName'); 
        }, 50); 
} 
 
Please get back to us if you need any further assistance on this.  
 
Regards, 
Jesus Arockia Sankaran S 



TT Tomasz Tomczykiewicz July 11, 2019 12:35 PM UTC

Thanks, it helped me. I was passing the wrong index. 

Best regards,
Tomasz Tomczykiewicz


JA Jesus Arockia Sankaran S Syncfusion Team July 11, 2019 02:12 PM UTC

Hi Tomasz, 
 
Thanks for your update. 
 
Regards, 
Jesus Arockia Sankaran S 



TT Tomasz Tomczykiewicz September 3, 2019 02:31 PM UTC

Hi,

I upgraded the gantt package from 17.2.28-beta to 17.2.46. When I add a new row, then edit it and click outside the gantt, I have an error in the console.
I attached the demo.

Best regards,
Tomasz Tomczykiewicz

Attachment: ganttinlineadd_d8f5b79a.zip


GA Gurunathan A Syncfusion Team September 4, 2019 10:13 AM UTC

Hi Tomasz, 
Sorry for the inconveniences. 
We are able to reproduce the reported issue at our end and we logged a bug report for this. You can track its status from below feedback link. 
We will fix this issue and will include the fix in our upcoming weekly patch release on September 11, 2019. 
Until then we appreciate your patience. 
Thanks, 
Gurunathan  




TT Tomasz Tomczykiewicz September 16, 2019 09:56 AM UTC

Hi,

I upgrade @syncfusion/ej2-vue-gantt to version 17.2.51 but the package has a lot of bugs. The reported bug is not fixed and new bugs occurred (for example the taskbarBgColor is not applied or the taskbarEdited event is not fired). We need these bugs fixed asap because you promised us that this will be fixed by 11th September.

Best regards,
Tomasz Tomczykiewicz

Attachment: ganttinlineadd_209f2e45.zip


MD Malgorzata Dobkowska September 16, 2019 11:19 AM UTC

I would like to express my deep dissatisfaction with how this issue is handled. Our team has deadlines with customers and our business relies on how such issues are fixed. We were promised to receive a bugfix by 9/11, however the new package versions break the Gantt chart control completely so that it is even worse than the previous version.


DJ Davis Jebaraj Syncfusion Team September 16, 2019 05:13 PM UTC

Hi Thomasz/Michal,

We regret for the inconvenience caused. We are working with very high priority and will provide a stable fix ASAP.

Thanks and Regards,

Davis


PP Pooja Priya Krishna Moorthy Syncfusion Team September 17, 2019 01:39 PM UTC

Hi Tomaz/Michal, 
 
Sorry for the inconvenience caused. 
We have checked the provided sample, these errors are occurs due to an issues with ej2-vue-base and ej2-vue-gantt packages. These packages are not properly published in NPM. 
But fix for the reported issue was included in ej2-gantt package, this package was published properly. Currently we prepared a sample with proper package files of ej2-vue-base and ej2-vue-gantt, these files are included in patches folder, it is placed inside the root folder of sample. Please follow the below steps to run the sample. 
 
  1. Extract the provided sample
  2. Add below code snippet in package.json file, this already done in provided sample
"scripts": { 
    "serve": "vue-cli-service serve", 
    "build": "vue-cli-service build", 
    "lint": "vue-cli-service lint", 
    "postinstall": "xcopy patches node_modules /s /y" 
  }, 
 
  1. Run npm install command to install the packages
  2. Run npm run postinstall command to copy packages files from patches folder to node_modules folder.
  3. Run npm run serve command to run the application.
 
 
This packages related issue will be resolved and it will published in NPM by next release. Our next release was Volume 3, 2019 beta release, this issue fix was already included in that release. This will be available on or before September 20, 2019. You can use beta version of package or else you can use the above provided patch file with ej2-gantt package(version 17.2.51) we will update you once the beta release will be rolled out. 
 
Please let us know, if you require further assistance on this. 
 
Regards, 
Pooja Priya K. 
 



GA Gurunathan A Syncfusion Team September 20, 2019 11:05 AM UTC

Hi Tomaz/Michal, 
We have resolved the issues in package and republished the package in new version 17.2.52, please upgrade the Gantt packages to the v17.2.52 in your application and we have prepared a sample with latest source, please find the sample from below link. 
Thanks, 
Gurunathan 




TT Tomasz Tomczykiewicz September 23, 2019 01:31 PM UTC

Hi,

Thank you for update, now is working.

Best regards,
Tomasz Tomczykiewicz


GA Gurunathan A Syncfusion Team September 24, 2019 05:15 AM UTC

Hi Tomasz, 
  
Thanks for update. We are happy to assist you.  
  
Regards, 
Gurunathan 


Loader.
Live Chat Icon For mobile
Up arrow icon