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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cancelling cellEdit event brokes the control

Thread ID:

Created:

Updated:

Platform:

Replies:

147968 Sep 30,2019 11:15 AM UTC Oct 29,2019 04:50 PM UTC Vue 9
loading
Tags: Gantt Chart
Tomasz Tomczykiewicz
Asked On September 30, 2019 11:15 AM UTC

Hi,

I found the next bug in Gantt control. When you try to edit a cell, but you cancel editing. Next, you refresh the datasource, the Gantt control doesn't emit the actionComplete event.

I attach a simple demo (try to edit the task, then click the button 'Add task').

Best regards,
Tomasz Tomczykiewicz

Attachment: ganttstopsworking_e3bc264e.zip

Gurunathan A [Syncfusion]
Replied On October 1, 2019 01:23 PM UTC

Hi Tomasz, 
We were able to replicate the issue “DataSource not refreshed properly after cancelling the edit action on cellEditing”. We will consider this as a bug in our end and the fix for the issue has been included in our next patch release which is expected at the 2nd Week of October. 
You can track the current status of your request, review the resolution timeline and contact us for any further inquiries through this link. 
  
Disclaimer:- Since the Feedback link is in review state, you can track the status of the request once it has been moved to validated state. 
Note: To view the above feedback, kindly login into your account. 
  
Regards, 
Gurunathan 
  
  


Tomasz Tomczykiewicz
Replied On October 17, 2019 11:16 AM UTC

Hi,

I found a new bug out. I attached an example with gif.
When I add a new row, then push the tab button and click outside the newly added row, the actionComplete event is not fired.

Best regards,
Tomasz Tomczykiewicz

Attachment: ganttstopsworking_cfab6ece.zip

Saranya Dhayalan [Syncfusion]
Replied On October 18, 2019 10:48 AM UTC

Hi Tomasz, 
Thanks for your update 
 
On editing a cell, cellEdit event gets triggered. When task gets saved by cell edit, endEdit event gets triggered. actionComplete event gets triggered only on dialog editing.  
Please find the below code example. 
 
<template> 
   <ejs-gantt id="gantt" 
       //... 
       @endEdit="endEdit" >    
   </ejs-gantt> 
</template> 
<script> 
    //... 
   methods: { 
   //... 
      endEdit(args){ 
           console.log('triggered') 
      } 
   }, 
</script> 
Please get back to us if you require further assistance on this. 
 
Regards, 
Saranya D 
 


Tomasz Tomczykiewicz
Replied On October 21, 2019 02:08 PM UTC

Hi,

The last event fired by gantt control is:


For me this is strange, that action is started (actionBegin), but is not end (actionComplete).

Best regards,
Tomasz Tomczykiewicz

Pooja Priya Krishna Moorthy [Syncfusion]
Replied On October 22, 2019 06:19 PM UTC

Hi Tomasz, 
 
We can also replicate the same behavior in our sample, TreeGrid component one of main dependent component for Gantt, we have passed most of the events to customer raised from TreeGrid control. 
On cell save action, actionBegin event gets triggered in TreeGrid control but actionComplete event is overridden so this event does not gets triggered. Can you tell us your requirement what do you want to achieve after saving the cell. So that it will be very helpful to provide you a solution. 
 
Thanks, 
Pooja Priya K 


Tomasz Tomczykiewicz
Replied On October 23, 2019 08:37 AM UTC

Hi,

I would like to have actionComplete refresh emitted after actionBegin refresh.

Best regards,
Tomasz Tomczykiewicz

Saranya Dhayalan [Syncfusion]
Replied On October 24, 2019 01:30 PM UTC

Hi Tomasz, 
Thanks for the update 
We have checked code snippets implemented in onActionComplete method in provided sample, in this method on cell save action, you have pushed the args.data.taskData value into EXAMPLE_DATA  this variable was bound to data source of Gantt, so while pushing new item Gantt control was refreshed with new data source value. At this time, actionComplete event not completed successfully and data source update action initiated, so the actionBegin event called, but it not completed so the actionComplete was not emitted. On editing action data source of Gantt will be updated properly, so we no need to update it externally. 
If you want to update it, please try with timeout function. And also, please share us your requirement on actionComplete, it will helpful to provide proper solution for this. 
Please find the below code snippet: 
onActionComplete(args)  
{ 
//……. 
 
    if (args.type === 'save') { 
    //……. 
 
          EXAMPLE_DATA.push(args.data.taskData); 
   
          this.data = cloneDeep(EXAMPLE_DATA); 
     } 
 
    //……. 
} 

Regards, 
Saranya D 



Tomasz Tomczykiewicz
Replied On October 28, 2019 03:54 PM UTC

Hi,

My scenario:
1. I add a new row or edit the existing row.
2. I send the row to the API.
3. The API saves row to the database.
4. I get a whole tree of nodes.

The problem is that I show my custom loader and I hide it on event actionComplete refresh. I have a lot of nodes and it takes a while to render a Gantt chart. So I need the actionComplete refresh event to hide loader.

I attach a new example. Edit a row's name, press TAB button and click outside a row- the loader won't hide.

Best regards,
Tomasz Tomczykiewicz

Attachment: ganttstopsworking_ab0bae79.zip

Karthikeyan Raja [Syncfusion]
Replied On October 29, 2019 04:50 PM UTC

Hi Tomasz, 
  
As we explained in our previous update, newly added data to the datasource mapped item then control will be re-render. Hence, actionComplete event not called. But, your reported requirements can also be achieved by passed, added Or edited data to the server side instead of add to the existing datasource variable. 
From your server code, you can update to the database.  
During load time, we can fetch data from database using datamanager support.  
Please find the following sample code snippet, 
  
[ganttChart.vue] 
//... 
  
data() { 
   return { 
       dataSource: new DataManager({ 
            url: 'http://localhost:7777/GanttEJ2/getData', 
            crossDomain: true 
     }) ; 
   //... 
  
Method: { 
   onActionComplete: function (args) { 
       if (args.action == "add) { 
           $.ajax({ 
              type: "POST", 
              url: 'http://localhost:7777/GanttEJ2/addData 
              data: args.data.taskData, 
                 //... 
           }); 
       } 
  
       if (args.action == "DialogEditing" || args.action == "CellEditing") { 
           $.ajax({ 
               type: "POST", 
               url: 'http://localhost:7777/GanttEJ2/updateData 
               data: args.data.taskData, 
                  //... 
            }); 
        } 
        if (args.action == "delete") { 
            $.ajax({ 
               type: "POST", 
               url: 'http://localhost:7777/GanttEJ2/deleteData 
               data: args.data.taskData, 
                  //... 
            }); 
        } 
     } 
}); 
  
 If the given concept meets your exact requirement then we will provide optimised way of solution like adaptor concept to achieve above solution.  
Please let us know, if you need further assistance on this.  
  
Thanks, 
Karthikeyan Raja 


CONFIRMATION

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon