I have a WPF Datagrid in my application where I set the value of the ItemSource to the DefaultView of a DataTable that I have constructed. The problem lies in the fact that whenever I set the ColumnName of one of the columns in my DataTable to a string that includes '/' the header shows up in the DataGrid control but the values do not. How can I get around this?
This is the same table with the '/' replaced with '-'
as an aside this also appears to happen with headers that have a '.' in them. So any decimal will cause the same behavior.
My grid is defined as
<DataGrid x:Name="dgLFKPI" />
and I am setting the value in code behind (yes it should be in a viewmodel and MVVM but it is a legacy app that is slowly moving that way).
dgLFKPI.ItemsSource = dt.DefaultView;