@@ -25,14 +25,14 @@ The following code illustrates how to bind the Task Details to the Gantt Control
2525
2626{% highlight xaml %}
2727
28- <syncfusion: GanttControl x: Name ="ganttControl"
28+ <syncfusion: GanttControl x: Name ="ganttControl"
2929 ItemsSource="{Binding TaskDetails}">
3030 < syncfusion:GanttControl.TaskAttributeMapping >
31- <syncfusion: TaskAttributeMapping TaskIdMapping="ID "
32- TaskNameMapping="Name "
31+ <syncfusion: TaskAttributeMapping TaskIdMapping="TaskId "
32+ TaskNameMapping="TaskName "
3333 StartDateMapping="StartDate"
34- ChildMapping="ChildCollection "
35- FinishDateMapping="EndDate "
34+ ChildMapping="Child "
35+ FinishDateMapping="FinishDate "
3636 DurationMapping="Duration"
3737 ProgressMapping="Progress"/>
3838 </syncfusion: GanttControl .TaskAttributeMapping>
@@ -45,19 +45,19 @@ The following code illustrates how to bind the Task Details to the Gantt Control
4545
4646{% highlight c# %}
4747
48- this.ganttControl.ItemsSource = new ViewModel().TaskDetails;
49-
5048// Task attribute mapping
5149TaskAttributeMapping taskAttributeMapping = new TaskAttributeMapping();
52- taskAttributeMapping.TaskIdMapping = "ID ";
53- taskAttributeMapping.TaskNameMapping = "Name ";
50+ taskAttributeMapping.TaskIdMapping = "TaskId ";
51+ taskAttributeMapping.TaskNameMapping = "TaskName ";
5452taskAttributeMapping.StartDateMapping = "StartDate";
55- taskAttributeMapping.ChildMapping = "ChildCollection ";
56- taskAttributeMapping.FinishDateMapping = "EndDate ";
53+ taskAttributeMapping.ChildMapping = "Child ";
54+ taskAttributeMapping.FinishDateMapping = "FinishDate ";
5755taskAttributeMapping.DurationMapping = "Duration";
5856taskAttributeMapping.ProgressMapping = "Progress";
5957this.ganttControl.TaskAttributeMapping = taskAttributeMapping;
6058
59+ this.ganttControl.ItemsSource = new ViewModel().TaskDetails;
60+
6161{% endhighlight %}
6262
6363{% highlight c# tabtitle="ViewModel.cs" %}
@@ -178,8 +178,6 @@ The following code illustrate how to map the properties using the [TaskAttribute
178178{% endhighlight %}
179179{% highlight c# %}
180180
181- this.ganttControl.ItemsSource = new ViewModel().TaskDetails;
182-
183181// Task attribute mapping
184182TaskAttributeMapping taskAttributeMapping = new TaskAttributeMapping();
185183taskAttributeMapping.TaskIdMapping = "ID";
@@ -193,6 +191,8 @@ taskAttributeMapping.PredecessorMapping = "Predecessor";
193191taskAttributeMapping.ResourceInfoMapping = "Resource";
194192this.ganttControl.TaskAttributeMapping = taskAttributeMapping;
195193
194+ this.ganttControl.ItemsSource = new ViewModel().TaskCollection;
195+
196196{% endhighlight %}
197197{% endtabs %}
198198
@@ -222,8 +222,6 @@ The following code illustrates how to bind the external source to Gantt control:
222222{% endhighlight %}
223223{% highlight c# %}
224224
225- this.ganttControl.ItemsSource = new ViewModel().TaskCollection;
226-
227225// Task attribute mapping
228226TaskAttributeMapping taskAttributeMapping = new TaskAttributeMapping();
229227taskAttributeMapping.TaskIdMapping = "ID";
@@ -237,6 +235,8 @@ taskAttributeMapping.PredecessorMapping = "Predecessor";
237235taskAttributeMapping.ResourceInfoMapping = "Resource";
238236this.ganttControl.TaskAttributeMapping = taskAttributeMapping;
239237
238+ this.ganttControl.ItemsSource = new ViewModel().TaskCollection;
239+
240240{% endhighlight %}
241241{% highlight c# tabtitle="Task.cs" %}
242242
0 commit comments