Hello,
I'm building a Gantt chart in a web application, loading data from a remote source using a CustomDataAdaptor. By defining the "getData" function of the CustomDataAdaptor, I'm able to build a POST request to a specific server endpoint and retrieve the data to be shown in the chart.
I have injected the Edit module to allow the editing of the time periods of each task shown in the chart. I have also set the 'editSettings' with mode 'Auto', and the 'editDialogFields' of type 'Custom'.
The editing can be done by double-clicking on the desired task and modifying the values in the shown edit dialog. The issue appears when clicking on the save button: no action is performed. I believed pressing the save button was supposed to trigger the 'actionComplete' function with the 'requestType' parameter set to 'save', but the click event results in no trigger at all, and does not even close the dialog. Also when the dialog is closed clicking on the button 'Cancel', a loading animation remains hanging on the chart until the chart is clicked.
On the forum, I read about a similar issue caused by the absence of either a TaskField named "id" or a column with an "isPrimaryKey" field set to true, but this is not the case with my code since I have added both.
Sadly I cannot attach screenshots of my code, however could you give me a hint on what could be the problem?
Thank you.
Hi Riccardo,
Greetings from
Syncfusion Support.
We have tried to replicate the issue based on
the information, but we are unable to replicate the issue on our end. We have
attached a video reference; please refer to it.
Video reference: https://www.syncfusion.com/downloads/support/directtrac/general/ze/adaptor1881951264.zip
Sample link: https://stackblitz.com/edit/gfc99h-7nyh44?file=index.js,index.html
Web Service: https://www.syncfusion.com/downloads/support/directtrac/general/ze/DataManager-1584476724.zip
We request you to share more information to achieve your requirement. Kindly share the details below.
Once we receive this information, we will be better equipped to identify the
root cause of the issue and provide you with the necessary assistance.
Regards,
Ajithkumar G
@ Syncfusion Team, I tested according to your suggestion, and editing and deleting worked fine. However, when I click the Add button and try to save, I get an error: error = TypeError: Cannot set properties of undefined (setting 'addedRecords') at t.processResponse (https://localhost:7091/js/ej2/ej2.min.js:1:1630066) at e.successFunc (https://localhost:7091/js/ej2/ej2.min.js:1:1669554) at https://localhost:7091/gantt/newgantt.html:31:20.
Hi Liguangfu,
We appreciate your patience.
We can replicate the problem our end. We have logged this reported issue, ‘While Adding records are not displayed while using CustomDataAdaptor with Batch mode' as a bug. We are working on a fix for this issue and plan to include it in our upcoming patch release which is scheduled to be rolled out on Oct 15, 2024. You can track its status from the feedback link given below.
You can track the progress of the resolution by visiting the feedback link provided below:
Feedback link: https://www.syncfusion.com/feedback/61582/while-adding-records-are-not-displayed-while-using-customdataadaptor-with-batch
Note: The feedback link is in review state and you can view it once it is validated.
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.
Regards,
Ajithkumar G
Hi Liguangfu,
Sorry for the inconvenience caused.
We are glad to announce that our patch release (v 27.1.53) is rolled out successfully. In this release, we have
added the fix for the reported issue.
Please upgrade to the latest version packages to resolve this
issue “While Adding records are not displayed while using CustomDataAdaptor
with Batch mode".
Root Cause: The changes value is not passed to the processResponse method
which is the cause of issue.
Sample link: https://stackblitz.com/edit/gfc99h-2nm6m8?file=index.js,index.html
Server sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/DataManager-704179168.zip
Contact us if you require any further assistance.
Regards,
Ajithkumar G