Cancelling cellEdit event brokes the control
Hi,
Attachment: ganttstopsworking_e3bc264e.zip
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
SIGN IN To post a reply.
9 Replies
GA
Gurunathan A
Syncfusion Team
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.
Feedback link: https://www.syncfusion.com/feedback/9217/datasource-not-refreshed-properly-after-cancelling-the-edit-action-on-cellediting
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
TT
Tomasz Tomczykiewicz
October 17, 2019 11:16 AM UTC
Hi,
Attachment: ganttstopsworking_cfab6ece.zip
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
SD
Saranya Dhayalan
Syncfusion Team
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
TT
Tomasz Tomczykiewicz
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
PP
Pooja Priya Krishna Moorthy
Syncfusion Team
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
TT
Tomasz Tomczykiewicz
October 23, 2019 08:37 AM UTC
Hi,
I would like to have actionComplete refresh emitted after actionBegin refresh.
Best regards,
Tomasz Tomczykiewicz
SD
Saranya Dhayalan
Syncfusion Team
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
TT
Tomasz Tomczykiewicz
October 28, 2019 03:54 PM UTC
Hi,
Attachment: ganttstopsworking_ab0bae79.zip
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
KR
Karthikeyan Raja
Syncfusion Team
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
SIGN IN To post a reply.
- 9 Replies
- 5 Participants
-
TT Tomasz Tomczykiewicz
- Sep 30, 2019 11:15 AM UTC
- Oct 29, 2019 04:50 PM UTC