1. 程式人生 > >Devexpress GridControl無限高度惹得禍

Devexpress GridControl無限高度惹得禍

ont into AS inf ace you case manually dev

異常提示:

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>

Devexpress GridControl無限高度惹得禍