Binding to fields containing a period in DataTable in C#/WPF

后端 未结 1 1672
不思量自难忘°
不思量自难忘° 2021-01-22 03:13

I have a SQL CE database, which is beyond my control, that has fields in the format of ., complete with a period in the column name. The columns will always be different, so I

相关标签:
1条回答
  • 2021-01-22 03:53

    For alternative replace . dot with \u2024

    If you put this question to Microsoft people, they will tell you that this (your problem) is because WPF DataGrid supports "sub properties data mapping" when there is a data source. For this reason, . dot tries to resolve to sub object contained in your DataTable.

    In the next line they will politely ask you to replace your . dot to _ Underscore in column name.

    (http://social.msdn.microsoft.com/Forums/en/wpf/thread/7d84c8f2-2709-4642-a259-739036ffd2a6)

    But that's neither a solution nor an alternative.

    Solution will only be provided by them by changing their coding.

    For alternative replace . with \u2024 This is the unicode character for C/C++/Java

    More on this here

    0 讨论(0)
提交回复
热议问题