Cascade delete of gantt tasks

I have some tasks saved in my database and everything work well.
So, if I have a nested taks like this:

task 1
|__ task 2
|__ task 3

What can I do for delete task 3 if I delete task 2 ? I have an id , parent id and order for suitable fields to use for my sql query.

Anyone can help me ??

Thanks in advance


Have you tried deleteTask() method? … etask.html