How to programmatically form an observable collection and bind it to a datagrid
问题 I have a problem which i'd divide in two steps: Problem1. Form an observable collection of strings and bind it to a datagrid ObservableCollection<string[]> octest = new ObservableCollection<string[]>(); var el = new string[6] {"1","2","3", "4", "5", "6" }; octest.Add(el); octest.Add(el); octest.Add(el); dtgResults.ItemsSource = octest; the problem is that the binding results in the image below: Problem 2 The same but now with an array of strings but with mixed elements (e.g. 3 strings and 3