So I\'ve setup a viewmodel to where it binds an ObservableCollection
to my DataGrid.
It prints out the value just fine but it also prints out
DataGrid has property AutoGenerateColumns
which is set to True
by default and makes DataGrid to create a column for each property defined in items.
DataGrid is bound to NewList
which contains items of type string
which has Length property. So it makes Length
column
you can disable auto-generation by setting <DataGrid AutoGenerateColumns="False" ...
I forgot to add the property AutoGenerateColumns="False"
.
Not sure why it was set to true by default or why it woudl choose the length
property of all the properties but I guess I got it fixed.