Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1370
How WinGantt works ? I don't get it
posted

Hi,

I have multiple task with link between them for constraints.
Each task is linked to a project.

Sample of my database :

Task1, starts on 01/01/2014, duration of 4 days.
Task2, starts when Task1 is over (05/01/2014), duration of 10 dayz. (Link to Task1 with TaskparentId)

Task3, start on 01/01/2014, duration of 15 days.
No substask

Task4, start on 01/01/2014, duration of 3 days. 
3 subtasks, linked to each other.  

I want to see all my task in the same gantt.  (See picture top image).
And I'd like to see what is the project of tasks.
(How to not show week ends ? nobody works week ends here ^^) 

But with your control, i created Data with 1 project (to see all my task in the same window), and add all task with parenttask.
Many tasks has wierd startdate , duration set to 0 and are "disabled" in the task table. (See picture bottom image).

I don't understand how your control works. 

The code for creating Data

foreach (DataRow dr in ds.Tables[0].Rows)
{
idTache = int.Parse(dr["IdTache"].ToString());
dtDebutTache = Convert.ToDateTime(dr["DteDebutTache"]);
dtFinTache = Convert.ToDateTime(dr["DteFinTache"]);
duration = dtFinTache - dtDebutTache;
if (dr["IdTacheParent"] != null && !string.IsNullOrEmpty(dr["IdTacheParent"].ToString()))
{
theTasks.Rows.Add(new Object[] { lstGuid[idTache], projectKey, dr["TxtNomTache"].ToString(), dtDebutTache, duration, lstGuid[Convert.ToInt32(dr["IdTacheParent"].ToString())], TaskConstraint.StartNoEarlierThan, null });
}
else
{
theTasks.Rows.Add(new Object[] { lstGuid[idTache], projectKey, dr["TxtNomTache"].ToString(), dtDebutTache, duration, null, TaskConstraint.AsSoonAsPossible, null });
}
}

 Thanks.

Parents
No Data
Reply
  • 1370
    Offline posted

    So ... there is some improvment to my tests.

    I'm adding Tasks to represent Projects
    I'm adding tasks to represent Projects' Tasks, with a parent link to the project Guid.


    Sample :

    Tasks.add(myProject,null);

    foreach(task in myProject)
       Task[myProject].Tasks.add(task, myproject);

    I have a summary task filled with tasks.

    Its OK but i have to set Date start and Date end on each task.
    But how can we set a task start just after the end of the previous task ?

    Because if I modify the end date of a task, the next  task doesn't change its date start.

    How can we add columns ? I looked into all your samples, but nothing s working.

     

Children