简体   繁体   English

如何解决WPF中显示的数据网格?

[英]How can I solve datagrid showing in WPF?

I'm trying to add a data table to a datagrid on WPF (C#) but when the columns become more than 29, the datagrid does not show the values of other columns. 我正在尝试将数据表添加到WPF(C#)上的数据网格中,但是当列数超过29时,数据网格将不会显示其他列的值。 could anyone help me in this problem? 谁能帮助我解决这个问题? thank you 谢谢

DtGrResult.ItemsSource = tbl_main.AsDataView();

Set the HorizontalScrollBarVisibility attribute of the datagrid to Visible or Auto and make sure each of your columns' Frozen attribute is set to false . 将数据网格的Horizo​​ntalScrollBarVisibility属性设置为VisibleAuto ,并确保将每个列的Frozen属性设置为false Hope that works for you. 希望对您有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM