Bug Report B190315
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

No MaxHeight throws endless exception

Grid throws InfiniteGridSizeException when in stackpanel

created 15 years ago

I am evaluating the WPF trial and came accross this issue that throws a runtime exception when I place a DX GridControl in a normal stackpanel. After throwing the exception it does not render.
I created a new WPF Browser Application project (Xbap), added one of the DX grids to the page, and put it in a stackpanel. See below for the source and exception:
Steps to Reproduce:
Here is my Page1.xaml source; the grid works when I take it out of the stackpanel.
<Page x:Class="WpfBrowserApplicationTesting.Page1"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      mc:Ignorable="d"
      d:DesignHeight="300" d:DesignWidth="300"
      Title="Page1" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid">
    <Grid Margin="50,0,0,0">
        <StackPanel>
        <dxg:GridControl HorizontalAlignment="Left" Margin="10,10,0,0" Name="gridControl1" VerticalAlignment="Top">
            <dxg:GridControl.Columns>
                <dxg:GridColumn FieldName="Column1" />
                <dxg:GridColumn FieldName="Column2" />
            </dxg:GridControl.Columns>
            <dxg:GridControl.View>
                <dxg:TableView />
            </dxg:GridControl.View>
        </dxg:GridControl>
        </StackPanel>
    </Grid>
</Page>
Actual Results:
This is the runtime exception I receive:
"The constructor to deserialize an object of type 'DevExpress.Xpf.Grid.InfiniteGridSizeException' was not found.".

Comments (2)
DevExpress Support Team 15 years ago

    Hello,
    Thank you for the report. I belive we have already answered a similar question. Please review the following thread: No MaxHeight throws endless exception. Let me know if you need further assistance.
    Thank you, Marina

      That appears to be the same issue so I will mark as closed. However the workarounds feel like hacks; the grid's default behavior will crash the application if the developer doesn't manually specify a maximum height or that it's okay to have "infinite" rows, even if the application will never enough rows to cause a performance issue in the first place.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.