DataTable Binding – Header containing "/" symbol prevents cell rendering in WPF DataGrid
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
### Description
Environment:
- OS: Windows 11 (64-bit)
- .NET version: .NET 9
When binding a System.Data.DataTable to a WPF DataGrid, if the DataColumn.ColumnName contains a / (forward slash), all subsequent cells in that column fail to display values.
This behavior occurs consistently and is independent of the data type or number of rows.
Demo project:
[DataGridTableBug.zip](https://github.com/user-attachments/files/21918537/DataGridTableBug.zip)
### Reproduction Steps
```
public static DataTable LoadDataTable()
{
DataTable table = new DataTable();
table.Columns.Add("2025-Forecast");
table.Columns.Add("2025/Forecast"); // header with '/'
for (int i = 0; i < 7; i++)
{
var dataRow = table.NewRow();
dataRow[0] = $"Value1 {i}";
dataRow[1] = $"Value2 {i}";
table.Rows.Add(dataRow);
}
foreach (var c in table.Columns)
{
Debug.WriteLine(c.ToString());
}
return table;
}
```

### Expected behavior
Display all values
### Actual behavior
Empty cells under the header with a "/" symbol.
### Regression?
_No response_
### Known Workarounds
_No response_
### Impact
_No response_
### Configuration
_No response_
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.