I have a .Net datatable that I am using as a source to a WPF datagrid. The problem I have is that some of the column headers in the datatable contain dots. When binding the datatable to the datagrid, the columns containing dots are displayed, but contain no data.
After reading around on the net I have worked out that the dots are a special notation used within the databinding engine and are confusing the datagrid's binding to the table.
I have tried manually creating the datagrid columns + bindings and adding square brackets to negate the dots. This works fine but then breaks when I sort a column. This article mentions hooking into the sorting event to remove the [] on the sorting event. There wasnt much detail of how to achieve this and what I did try did not seem to get rid of the error.
Please let me know if you require anymore information.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…