What is it about DataTable Column Names with dots that makes them unsuitable for WPF's DataGrid control?

前端 未结 4 1325
生来不讨喜
生来不讨喜 2020-11-27 21:21

Run this, and be confused:



        
4条回答
  •  醉酒成梦
    2020-11-27 21:46

    The FULL STOP (period/dot) character does not work.
    Even escaping with x\002E did not work.

    Here is a compromise using the MIDDLE DOT character:

    dt1.Columns.Add("a\x00B7name", typeof(string));  
    dt1.Columns.Add("b\x00B7name", typeof(string));
    

提交回复
热议问题