I have an object that has two members, one is a string and the other is an array of ushort. I need to display each element in the array in a different column.
<DataGrid ItemsSource="{Binding Results}" AutoGenerateColumns="True" />
The datagrid is binded to a viewmodel:
public class ViewModel
{
public ObservableCollection<ResultView> Results
{
get;
set;
}
}
public class ResultView
{
public string From {};
public ushort[] Data {};
}
Edit:
There are no errors, what is happenning now is that I change the getter of the ushort array to return one big string that displays all the elements, but I want each element to be displayed in a different column.