Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified wpf/Gantt/Getting-Started_images/Getting-Started_img4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified wpf/Gantt/Getting-Started_images/gantt-control-gantt-chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified wpf/Gantt/Getting-Started_images/gantt-control-gantt-grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified wpf/Gantt/Overview_images/gantt-control-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 49 additions & 19 deletions wpf/Gantt/auto-update-hierarchy.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public class Task : INotifyPropertyChanged
}

/// <summary>
/// Property for Start Date.
/// Gets or sets the start date.
/// </summary>
public DateTime StartDate
{
Expand All @@ -101,7 +101,7 @@ public class Task : INotifyPropertyChanged
}

/// <summary>
/// Property for Finish Date.
/// Gets or sets the finish date.
/// </summary>
public DateTime EndDate
{
Expand All @@ -117,7 +117,7 @@ public class Task : INotifyPropertyChanged
}

/// <summary>
/// Property for duration value.
/// Gets or sets the duration value.
/// </summary>
public TimeSpan Duration
{
Expand All @@ -133,7 +133,7 @@ public class Task : INotifyPropertyChanged
}

/// <summary>
/// Property for ID value.
/// Gets or sets the id value.
/// </summary>
public int ID
{
Expand All @@ -149,7 +149,7 @@ public class Task : INotifyPropertyChanged
}

/// <summary>
/// Property for Name.
/// Gets or sets the name.
/// </summary>
public string Name
{
Expand All @@ -165,7 +165,7 @@ public class Task : INotifyPropertyChanged
}

/// <summary>
/// Property to define progress value.
/// Gets or sets the progress value.
/// </summary>
public double Progress
{
Expand All @@ -181,7 +181,7 @@ public class Task : INotifyPropertyChanged
}

/// <summary>
/// Property to add child collection.
/// Gets or sets the child collection.
/// </summary>
public ObservableCollection<Task> ChildCollection
{
Expand All @@ -196,6 +196,9 @@ public class Task : INotifyPropertyChanged
}
}

/// <summary>
/// Method to get property changed.
/// </summary>
private void OnPropertyChanged(string propName)
{
if (this.PropertyChanged != null)
Expand All @@ -219,7 +222,7 @@ public class Task : INotifyPropertyChanged
public class ViewModel
{
/// <summary>
/// Property to add child collection.
/// Gets or sets the child collection.
/// </summary>
public ObservableCollection<Task> TaskCollection { get; set; }

Expand Down Expand Up @@ -346,9 +349,21 @@ public class ViewModel
</syncfusion:GanttControl>
{% endhighlight %}
{% highlight c# %}
GanttControl ganttControl = new GanttControl();

this.ganttControl.UseAutoUpdateHierarchy = false;
this.ganttControl.ItemsSource = new ViewModel().TaskDetails;
this.Content = ganttControl;

// Task attribute mapping
TaskAttributeMapping taskAttributeMapping = new TaskAttributeMapping();
taskAttributeMapping.TaskIdMapping = "ID";
taskAttributeMapping.TaskNameMapping = "Name";
taskAttributeMapping.StartDateMapping = "StartDate";
taskAttributeMapping.ChildMapping = "ChildCollection";
taskAttributeMapping.FinishDateMapping = "EndDate";
taskAttributeMapping.DurationMapping = "Duration";
taskAttributeMapping.ProgressMapping = "Progress";
this.ganttControl.TaskAttributeMapping = taskAttributeMapping;

{% endhighlight %}
{% endtabs %}
{% endcapture %}
Expand Down Expand Up @@ -401,7 +416,7 @@ public class Task : NotificationObject
}

/// <summary>
/// Property for duration value.
/// Gets or sets the duration value.
/// </summary>
public TimeSpan Duration
{
Expand Down Expand Up @@ -435,7 +450,7 @@ public class Task : NotificationObject
}

/// <summary>
/// Property for Finish Date.
/// Gets or sets the finish date.
/// </summary>
public DateTime EndDate
{
Expand All @@ -457,7 +472,7 @@ public class Task : NotificationObject
}

/// <summary>
/// Property for Start Date.
/// Gets or sets the start date.
/// </summary>
public DateTime StartDate
{
Expand All @@ -483,7 +498,7 @@ public class Task : NotificationObject
}

/// <summary>
/// Property for Name value.
/// Gets or sets the name value.
/// </summary>
public string Name
{
Expand All @@ -496,7 +511,7 @@ public class Task : NotificationObject
}

/// <summary>
/// Property for ID value.
/// Gets or sets the id value.
/// </summary>
public int Id
{
Expand All @@ -509,7 +524,7 @@ public class Task : NotificationObject
}

/// <summary>
/// Property to add child collection.
/// Gets or sets the child collection.
/// </summary>
public ObservableCollection<Task> ChildCollection
{
Expand Down Expand Up @@ -563,6 +578,9 @@ public class Task : NotificationObject
progress = (this.childCollection.Aggregate(0d, (cur, task) => cur + task.progress)) / this.childCollection.Count;
}

/// <summary>
/// Method to update collection changed.
/// </summary>
public void ChildNodesCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
if (e.Action == NotifyCollectionChangedAction.Add)
Expand Down Expand Up @@ -593,7 +611,7 @@ public class Task : NotificationObject
public class ViewModel
{
/// <summary>
/// Property to add child collection.
/// Gets or sets the child collection.
/// </summary>
public ObservableCollection<Task> TaskCollection { get; set; }

Expand Down Expand Up @@ -723,10 +741,22 @@ public class ViewModel
</syncfusion:GanttControl>

{% endhighlight %}

{% highlight c# %}
GanttControl ganttControl = new GanttControl();
this.ganttControl.UseAutoUpdateHierarchy = false;
this.ganttControl.ItemsSource = new ViewModel().TaskDetails;
this.Content = ganttControl;

// Task attribute mapping
TaskAttributeMapping taskAttributeMapping = new TaskAttributeMapping();
taskAttributeMapping.TaskIdMapping = "ID";
taskAttributeMapping.TaskNameMapping = "Name";
taskAttributeMapping.StartDateMapping = "StartDate";
taskAttributeMapping.ChildMapping = "ChildCollection";
taskAttributeMapping.FinishDateMapping = "EndDate";
taskAttributeMapping.DurationMapping = "Duration";
taskAttributeMapping.ProgressMapping = "Progress";
this.ganttControl.TaskAttributeMapping = taskAttributeMapping;

{% endhighlight %}
{% endtabs %}
{% endcapture %}
Expand Down
Loading