When I click the ‘+’ icon in the column to add a task, I’d like this to add to an index I specify. I know that you’re able to pass in an optional index with the method addTask, but how do I do this in the add task column?
I’d like the add task in column to be linked to index 1.
Unfortunately, I couldn’t fully understand what you need to get. Do you need to execute a custom function after clicking on the + icon? If yes, you need to add new column where you return a div that will look like the + icon and has the events you need. Here is an example:
If you need something else, please clarify.
Thanks for your reply. When I click the add task icon in the column, I want to add the task as a nested task instead of being on index 0. I want it to add the task to index 1. https://docs.dhtmlx.com/gantt/api__gantt_addtask.html
I should be able to use the custom add snippet and manually call addTask and specify index 1, but is there a built it way to set the index for where add task goes in the column?
Better yet, how do I just disable the add task on the header? I just want the “+” icon on the header to be an image without having any action associated to clicking it.
I found this css update to be the best solution for disabling add task on the header:
Thank you for the clarification.
Here is the updated snippet:
There will won’t see + icon on the header and when you add a task, it will have index
1 or second task in the branch.
hey @testuser3 @ramil How to add task using create task on custom index i.e I want to add the new
task above the clicked task.