首页 > Windows开发 > 详细

WPF 中Devexpress GridControl无限高度问题

时间:2021-02-21 00:05:24      阅读:107      评论:0      收藏:0      [点我收藏+]

今天在用WPF开发时,调用DevExpress的GridControl。测试时正常,但最后转到所需要的框架出了问题,报错如下:

By default, an infinite grid height is not allowed since all grid rows will be rendered and, hence, the grid will work very slowly. To fix this issue, place the grid into a container that will give a finite height to the grid, or manually specify the grid‘s Height or MaxHeight. Note that you can also avoid this exception by setting the GridControl.AllowInfiniteGridSize static property to True, but in that case, the grid will run slowly.

我的英语也是个半罐水,翻译后才知道。是页面的Grid的Height为星号或者Atuo时,就会报这个错!

网上查的资料都说得。。。。。不说了伤心。

现在我用最简单的方法:

  直接把GridControl.View下添加一个MaxHeight就行了

<dxg:GridControl.View>
<dxg:TableView AllowPerPixelScrolling="True" ShowTotalSummary="True" ShowGroupPanel="False" GroupSummaryDisplayMode="AlignByColumns" AllowColumnFiltering="False" AllowResizing="True" MaxHeight="600"/>
</dxg:GridControl.View>

 

这个MaxHeight根据自己的实际情况添加

WPF 中Devexpress GridControl无限高度问题

原文:https://www.cnblogs.com/icewatermei/p/14423379.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!