Key: autogeneratecolumns in the gridview

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.