RadGridview size in RadDocumentPane

3 posts, 1 answers
  1. Joe Bohen
    Joe Bohen avatar
    62 posts
    Member since:
    May 2009

    Posted 08 Sep 2013 Link to this post

    Hi,

    I am hosting a radgridview in a RadDocumentPane,  The gridview's source is set by code and can change dependent on user selection.  I would like the radgridview height to size to the RadDocumentPane so that the scrollbars would show automatically and the radgridview would not extend beyond the bottom of the RadDocumentPane.  I have not been able to acheive this, would you please advice me on this.

    Regards,
    Joe

     <telerik:RadDocking   BorderThickness="0" Padding="2">
                <telerik:RadDocking.DocumentHost>
                    <telerik:RadSplitContainer  >
                        <telerik:RadPaneGroup>
                            <telerik:RadDocumentPane  telerik:StyleManager.Theme="Office_Black" x:Name="optpnl" Width="400" >
                                <StackPanel Orientation="Vertical" >                        
                                    <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"  >
                                        <telerik:RadGridView x:Name="InfoGrid" RowHeight="10.5" telerik:StyleManager.Theme="Office_Black"
                                    AutoGenerateColumns="True" ShowGroupPanel="False"  AlternateRowBackground="LightBlue"  AlternationCount="2"
                                    IsReadOnly="False" IsFilteringAllowed="False" RowIndicatorVisibility="Collapsed"
                                    CanUserReorderColumns="True" CanUserSortColumns="False" Padding="0" Margin="2,2,2,2">
                                        </telerik:RadGridView>
                                    </ScrollViewer>
                                    <telerik:RadBusyIndicator x:Name="busyInd"  telerik:StyleManager.Theme="Office_Black"  ></telerik:RadBusyIndicator>
                                </StackPanel>
                            </telerik:RadDocumentPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                </telerik:RadDocking.DocumentHost>
    </telerik:RadDocking>
  2. Answer
    Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 12 Sep 2013 Link to this post

    Hello,

    By default when you place a RadGridView control with many rows a RadDocumentPane that is placed inside the DocumentHost of the RadDocking control if the Height of the GridView is bigger then the available space the vertical/horizontal scroll bars will be automatically shown.

    I recorded and attached a short video for you showing how the described scenario run on our side. Please let us know if we have missed something, I also attached the sample project in which we tested the issue.

    Regards,
    Vladi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Joe Bohen
    Joe Bohen avatar
    62 posts
    Member since:
    May 2009

    Posted 12 Sep 2013 Link to this post

    Hi Vladi,

    Thanks for the help,  my problem was the use of the stack panel which was preventing the normal behavior of the gridview.  I was only using the stack panel so that I could also host the RadBusyIndicator (bad practice on my part) I have removed this and added the RadBusyIndicator at the end of the xaml and all is working as it should.

    Regards,,
    Joe
Back to Top