Welcome to the Xceed Community | Help
Community Search  
More Search Options

Unconstrained

Sort Posts: Previous Next
  •  11-16-2010, 3:41 PM Post no. 29250

    Unconstrained

    I tried putting the Grid in a Telerik.RadDockPanel and the grid throws an error saying it is not constrained with width and height.
  •  11-17-2010, 2:45 PM Post no. 29258 in reply to 29250

    Re: Unconstrained

    Hi,

    I assume that the RadDockPanel is some sort of a StackPanel. It is currently the intended behavior that our Grid will throw this exception when it is placed inside a StackPanel. However, we are currently looking into changing this behavior for future versions.

    The workaround for now would be to use a container other than a StackPanel.


    Regards,

    Alain Jreij,

    Web Developer,

    Xceed Software Inc
  •  11-17-2010, 3:43 PM Post no. 29259 in reply to 29258

    Re: Unconstrained

    RadDockPanel is like a WPF dock panel for silverlight.

    Docking to the Top Bottom Left Right. And the last item will fill the remaining space.

  •  11-18-2010, 10:24 AM Post no. 29268 in reply to 29259

    Re: Unconstrained

    Hi,
     
    This is the explanation from our Silverlight Grid's team leader: 
     
    To understand the reason why the exception is throw, we must first understand some of the mechanics of rendering. The "technical" reason is that the "measure" pass is made with a "infinite" height or width in the StackPanel (or in your case, the dock panel). Since the grid can contains a lot of rows (ie. 1000 000 rows), the grid would be rendered considering about 10 000 000 pixels height of screen estate.

    Try it with the Microsoft DataGrid. The grid is "chopped" and no scrollbar appear. This give the feeling that all rows are displayed on screen, but it is not the case. Xceed made the choice of throwing an exception in order to inform the developer that there is a potential mis-behavior of your component.

    If your case is that the grid never display more than about 10-20 rows height, set the With and Height of your grid accordingly like this:

    <sldg:DataGridControl x:Name="dataGrid" With="200" Height="200" >

    I understand that this is not the "fill" behavior you are expecting, but there is no other way to handle this in containers like the StackPanel.

    Regards,

    Alain Jreij,

    Web Developer,

    Xceed Software Inc
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.