This is a migrated thread and some comments may be shown as answers.

RadGridview size in RadDocumentPane

2 Answers 132 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Joe Bohen
Top achievements
Rank 1
Joe Bohen asked on 08 Sep 2013, 08:59 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Vladi
Telerik team
answered on 12 Sep 2013, 08:11 AM
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 >>
0
Joe Bohen
Top achievements
Rank 1
answered on 12 Sep 2013, 09:54 AM
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
Tags
Docking
Asked by
Joe Bohen
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Joe Bohen
Top achievements
Rank 1
Share this question
or