Hi guys,
I need some help.
In my angular application, after showing the data in the gantt chart, If I try to change the length of the taskbar, I see in the console the following error:
ERROR TypeError: nameSpace is undefined
What does it means?
Am I missing something?
I've allowTaskbarEditing set to true.
------
2) When I change the length of the taskbar, how can I get the the new duration value?
Thank you!
Matteo
Hi Matteo
Thank you for reaching out to us regarding the issue you encountered with your Gantt chart in your Angular application.
Based on your previous conversation, we understand that you are receiving an error message "ERROR TypeError: nameSpace is undefined" when attempting to change the length of the taskbar in your Gantt chart. In order to provide you with the appropriate solution, we kindly request you to provide us with additional information as listed below:
Sample Link : https://stackblitz.com/edit/angular-ogao9t?file=src%2Fmain.ts
Regards,
Udhayakumar
thank you for the reply. Apparently the nameSpace problem was solved thanks to a lot of trials. (I'm not sure which was the right cause)
For this second question:
2) When I change the length of the taskbar, how can I get the the new duration value?
How can I do it?
Because I tryed to pass an event in actionComplete(event). But it doesn't seems to work
Which kind on event should I pass as a parameter for understanding the new dates and/or the new duration of the task bar?
Thanks!
Matteo
------------------------------------------------
UPDATE
ok I understood that if I pass the chart itself as an argument I can check the value:
updatedRecords,
and see that the value is different. now the question is..
how can I understand previously which updatedRecord to watch?
if I've 10000 records I want to check only the changed one! Any Idea?
Thanks
Matteo
Matteo,
We have reviewed your query and we would be happy to help you with this.
To achieve this requirement, you can use the "taskbarEdited" event of the Gantt control. Inside this event, you can get the data of the task bar which is modified and from that, you can use that value as per your requirement. We have provided a code snippet and a sample link below that can help you in this scenario:
Code Snippet : /*app.component.ts*/ taskbarEdited(args){ console.log (args.data.Duration) }
|
Sample Link : https://stackblitz.com/edit/angular-panagz?file=src%2Fapp.component.html,src%2Fapp.component.ts
If you have any further questions or concerns, please do not hesitate to reach out to us. We are always here to help.
Regards,
Udhayakumar
Thank you for the reply. Now works!
Hi Matteo
We are glad that your issue has been resolved.
Please contact us If you need further assistance.
Regards,
Lokesh