Hide tasks and only show Parents

Hi,

I have 2 questions:

  1. I want to know if its possible to create a new task and if I create another one inside of it my child could get the values from the parent, for example:
    image
    If I create a new task inside of Project #1:
    image
    I want priority and Status to complete automatically with same values of Project#1, I only want to edit on Lightbox Task Name and start time in task child.

  2. If I group by Priority, can I show only the Projects and hide the child tasks?
    image
    I want to show:
    Priority - Low
    image
    Priority - Normal
    image
    Priority - High
    image

Thx.

Hello Arthur,

I want to know if its possible to create a new task and if I create another one inside of it my child could get the values from the parent, for example:

Yes, it is possible to implement that. You can use gantt.copy function, that is a deep copy function, to copy an object:
https://docs.dhtmlx.com/gantt/api__gantt_copy.html
Then you add a new task with cloned parameters.
Here is an example of how might work:
https://snippet.dhtmlx.com/5/47448a5a0

If I group by Priority, can I show only the Projects and hide the child tasks?

Yes, you can check if a task has the parent parameter in onBeforeTaskDisplay event handler, and return false to hide the task:
https://docs.dhtmlx.com/gantt/api__gantt_onbeforetaskdisplay_event.html
Here is an example:
http://snippet.dhtmlx.com/af74a398e

Thank you for the reply.