Sequencing Tasks and adding new tasks

Hi,

I have problems with two features:
1. I am using the "Unscheduled Tasks" feature and I have only baseline dates. I added some relations to tasks but the relations didn't show on the diagram. The "Sequencing Tasks" feature only works with actual dates?
2. Is there an option to adding a new task, not by the modal but inline (new row shows on the diagram and I fill the data)?

Best regards

9 Replies

JA Jesus Arockia Sankaran S Syncfusion Team October 29, 2018 09:10 AM UTC

Hi Tomasz, 
Thank you for contacting Syncfusion support. 
Please find the below updates 
Query1: I am using the "Unscheduled Tasks" feature and I have only baseline dates. I added some relations to tasks, but the relations didn't show on the diagram. The "Sequencing Tasks" feature only works with actual dates? 
Answer: In Gantt the Task dependencies or task relationship can be established between two tasks. In Unscheduled Tasks mode if the task does not have any startDate and endDate then the taskbar will not be rendered in Gantt chart so the task dependency line(predecessor) also didn’t render on Gantt chart.  
 
Query2: Is there an option to adding a new task, not by the modal but inline (new row shows on the diagram and I fill the data)? 
Answer: In Gantt there is no support to add the new task with inline support, but in Gantt there is support to add the task using context menu and addRecord public method, by using these support we can add the task without add dialog and after we can edit the record with Gantt cellEditing support. 
Regards, 
Jesus Arockia Sankaran S 



TT Tomasz Tomczykiewicz October 29, 2018 10:13 AM UTC

Hi Jesus,

Is there an option that you implement these two features in the next release?

Best regards,
Tomasz Tomczykiewicz


JA Jesus Arockia Sankaran S Syncfusion Team October 30, 2018 01:10 PM UTC

Hi Tomasz, 
 
Thanks for contacting Syncfusion support. 
 
Query1: I am using the “Unscheduled Tasks” feature and I have only baseline dates. I added some relations to tasks, but the relations didn’t show on the diagram. The “Sequencing Tasks” feature only works with actual dates? 
 
Answers: In Unscheduled tasks, with the start date and end date values undefined, the taskbar UI will not be rendered in chart section. And since the UI is not rendered for the taskbars it will be impossible to draw and position the connector lines. On the other hand if either start or end date is defined, it is possible to draw the connector lines for those unscheduled tasks in Gantt. Please find the sample for your reference here.  
 
Query2: Is there an option to adding a new task, not by the modal but inline (new row shows on the diagram and I fill the data)? 
 
Answer: In Gantt we can add new tasks inline using context menu and addRecord public method. Please find the below sample enabled with context menu and added new record in button click using addRecord public method.  
 
  
Please get back to us if you need any further assistance. 
 
 
Regards,  
Jesus Arockia Sankaran S 



TT Tomasz Tomczykiewicz October 30, 2018 01:34 PM UTC

Hi,

Unfortunately, it doesn't solve my problems.

Answer 1: I have the only baseline dates (planning phase).

Answer 2: Your solution has one problem that I can't edit the task name immediately. I have to click to the task name cell. Is there a method to call to edit specific cell?

Best regards,
Tomasz Tomczykiewicz


JA Jesus Arockia Sankaran S Syncfusion Team October 31, 2018 12:10 PM UTC

Hi Tomasz, 
Please find the response below, 
Query 1: I have the only baseline dates (planning phase). 
Answer: Predecessors are defined to draw relationship between 2 Task bars. So it is mandatory to have task bar start or end date. Base line dates are original plans that may vary in the project development. So we could not consider baselines to draw connector line. 
Query 2: Your solution has one problem that I can't edit the task name immediately. I have to click to the task name cell. Is there a method to call to edit specific cell? 
Answer: We can achieve your requirement to make the cell editable while adding new task by using Gantt Private methods.  
Code Snippet: 
[html] 
$("#GanttContainer").ejGantt({ 
        //… 
    }); 
    function addrecord() { 
        var obj = $("#GanttContainer").data("ejGantt"); 
        data = { 
            taskID: "44", 
            taskName: "New Task", 
            startDate: "2/25/2017", 
            endDate: "2/27/2017", 
        } 
        obj.addRecord(data, "top"); 
        var index = obj.model.updatedRecords.indexOf(obj.model.selectedItem); 
        obj._$treegridHelper.ejTreeGrid("cellEdit", index, "taskName"); // index and field names are parameters of the method "cellEdit" 
                                                                        // "index" is record index which we going to make editable and "taskName" is column field name. 
    } 
 
But we suggest you to change the taskName field value while inserting the task or by double clicking on the cell after inserted.  
Please get back to us if you need any further assistance.  
Regards, 
Jesus Arockia Sankaran S 



TT Tomasz Tomczykiewicz November 2, 2018 03:59 PM UTC

Hi,

Query 2: When I add a new row, it sets the name to "New Task 12" in the newly added row. How can I set it to an empty string?

Best regards,
Tomasz Tomczykiewicz


JA Jesus Arockia Sankaran S Syncfusion Team November 5, 2018 12:46 PM UTC

Hi Tomasz, 
Thanks for your update. 
We have analyzed your requirement and we have achieved this with some work around.  
Code Snippet: 
[html]  
$("#GanttContainer").ejGantt({  
        //…  
    });  
    function addrecord() {  
        var obj = $("#GanttContainer").data("ejGantt");  
        data = {  
            taskID: "44",  
            taskName: "",  
            startDate: "2/25/2017",  
            endDate: "2/27/2017",  
        }  
        obj.addRecord(data, "top");  
        var index = obj.model.updatedRecords.indexOf(obj.model.selectedItem);  
        obj._$treegridHelper.ejTreeGrid("cellEdit", index, "taskName");  
             $("#ejTreeGrid"+obj._id+"taskName").val(""); 
    }  
 
 
Please get back to us if you require any further assistance on  this. 
Regards, 
Jesus Arockia Sankaran S 



TT Tomasz Tomczykiewicz November 5, 2018 01:15 PM UTC

Hi,

Thanks, it solved my problem.
But I have another one. I click add above or below button, the new line shows on the chart. When I finish the editing, the "editEnd" event is fired, but the "rowIndex" property is undefined. So I don't know what index of the new element is. How can I get this information?

Best regards,
Tomasz Tomczykiewicz


JS Jonesherine Stephen Syncfusion Team November 6, 2018 02:11 PM UTC

Hi Tomasz, 
We regret the inconvenience caused. 
We have analyzed the reported issue. We are getting the rowIndex properly after saving the edit followed by context menu add. Please modify the below sample based on your application to replicate your issue else share the exact replication procedure, this would be helpful for us to serve you better. 
Regards, 
Jone sherine P S 


Loader.
Up arrow icon