Shortly after I started learning WPF, I used the DataGrid space todayCodeData cannot be displayed after being written.
After a day, there was no result. I accidentally moved the autogeneratecolumns attribute and set it to false. Solve the problem.
Online Search answer:
Autogeneratecolumns is the control that automatically generates columns, such as gridview. If autogeneratecolumns = true is set, the gridview table column is automatically generated based on the actual situation of the data source. If autogeneratecolumns = flaseProgramYou must manually write the columns set of the gridview control; otherwise, even if the data is set correctly, gridvew will not display anything. Because no columns are defined, and they are not automatically asked to generate their own columns. You can set some attributes in boundfield to modify the desired format.