Displaying data using DataGrid
Since UnoBookRail employees will use this app to manage existing issues, it is important for them to view all the issues to easily get an overview of their current status. While there is no built-in UWP and Uno Platform control that makes this easy to implement, luckily, the Windows Community Toolkit contains the right control for this case: DataGrid.
The DataGrid control allows us to render data as a table, specify which columns to display, and allows users to sort the table based on a column. Before we start using the DataGrid control, though, we need to create the ViewModel and prepare the views:
- First, create a new class named
IssueListViewModel.cs
inside theViewModels
Solution
folder and add the following code to it:using System.Collections.Generic; using UnoBookRail.Common.Issues; namespace ResourcePlanner.ViewModels { public class IssueListViewModel { ...