Devexpress GridControl无限高度惹得祸

本文探讨了在使用Grid布局时加入GridControl后遇到的页面加载失败问题。详细解释了发生此异常的原因在于GridControl的高度未被指定,导致系统无法完成渲染任务。文章提供了两种解决方案:一是为grid设置固定高度;二是为装载grid的容器设定固定高度。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

异常提示:

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布局中加了GridControl后出现

发生原因:网络指点,GridControl如果无限高度的话,由于grid需要渲染,因此没有高度的grid系统dev认为无法完成,因为会耗尽宽带,直接不处理。

症状:页面加载失败,无法显示,

处理意见:grid设置固定高度,或者装载grid的容器设置固定高度。

<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="5*"/>
<RowDefinition Height="95*"/> 原本:height=auto
</Grid.RowDefinitions>
</Grid>

 

转载于:https://www.cnblogs.com/stoneWl/p/9223765.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值