I'm having a whole lot of difficulty attempting to add data to a multi-column ListView
Here's the code for the ListView
ListView Height="263" Margin="12,29,12,0" Name="Tasks_ListView" VerticalAlignment="Top" ItemsSource="{Binding Source=}">
<ListView.View>
<GridView>
<GridViewColumn Width="91" DisplayMemberBinding="{Binding CourseName}" Header="Class Name" />
<GridViewColumn Width="275" Header="Assignment Name" DisplayMemberBinding="{Binding AssignmentName}"/>
<GridViewColumn Width="110" Header="Due Date" DisplayMemberBinding="{Binding Path=Due_Date}"/>
<GridViewColumn Width="184" Header="Unit" DisplayMemberBinding="{Binding Unit}"/>
</GridView>
</ListView.View>
</ListView>
Here's the data I want to add
foreach (Course Courses in CurrentUser.Course)
{
foreach (Assignment SelectedAssignment in Courses.CurrentUnit.Assignments)
{
ListViewItem CourseName = new ListViewItem();
ListViewItem AssignmentName = new ListViewItem();
ListViewItem DueDate = new ListViewItem();
ListViewItem UnitName = new ListViewItem();
CourseName.Name = Courses.Name;
AssignmentName.Name = SelectedAssignment.Name;
DueDate.Name = SelectedAssignment.Due_Date.ToString();
UnitName.Name = Courses.CurrentUnit.Name;
Tasks_ListView.Items.Add(CourseName);
}
}