Replied 14 April 2021, 10:19 pm EST
You can use a dynamic list as an ItemsSource but it will not work properly. This is because to determine the columns, firstly it is necessary to determine the type of the items. When the collection is generic and the type is different from the object, it uses that type to generate the columns, but if the generic type cannot be determined or it is an object, the first element of the collection is used. Otherwise, it wouldn't be possible to generate the columns for non-generic collections.
In the code it is using ObservableCollection<dynamic>, which ends up being an ObservableCollection<object>, actually, the collection is not dynamic as its items aren't dynamic. Instead, an ObservableCollection<ExpandoObject> can be used to hold the dynamic items.
Please refer to the sample attached for reference.
Note that the columns will not be automatically generated in this case.