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

How do I enable scrolling in RadTreeView?

15 Answers 688 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 16 Jun 2009, 02:45 AM
I have no vertical scrolling my my tree view.  If I click on a node with many children, the control expands below the bottom of the browser and provides no means of scrolling to out-of-view items.  There is no scrollbar available in the tree view, and the browser scrollbar, though visible, does not detect the change in the treeview height and is of no help (not that I want that solution to this problem....)

I've tried setting ScrollViewer.VerticalScrollBarVisibility="Auto" in the xaml, but I get a runtime exception "Unknown attribute ScrollViewer.VerticalScrollBarVisibility on element RadTreeView".

I may still be naive regarding automatic layout in Silverlight.  I want my controls (in general) to expand to the height of the browser.  The parent UserControl views of this tree (and there are several) general have their Height attribute set to "Auto".

15 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 16 Jun 2009, 08:18 AM
Hello Ken,

Check out this forum thread:
http://www.telerik.com/community/forums/silverlight/treeview/treeview-scrollviewer.aspx

Update:
The link above does not work, if you have questions about scrolling in the TreeView, post them here.

All the best,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Celeste
Top achievements
Rank 1
answered on 18 Jun 2009, 05:30 PM
I`ve checked out that forum.....but how can I enable vertical scrollbar using the code behind, because I`ve created treeview programatically.

I have my treeview inside a grid.
0
Bobi
Telerik team
answered on 19 Jun 2009, 09:51 AM
Hello Celeste,

You can enable the vertical scrollbar  of RadTreeView in code behind in this way:

     treeView.SetValue(System.Windows.Controls.ScrollViewer.VerticalScrollBarVisibilityProperty, ScrollBarVisibility.Visible);

I hope that this answers your question.

Sincerely yours,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Kabs Hussain
Top achievements
Rank 1
answered on 26 Nov 2009, 09:26 AM
Hi,
    I have a Treeview with Horizontal & Vertical Scrolling enabled.
However, after populating the Tree with Data,  I cann't see the Last node(Bottom node) of the Tree as it comes behind the the Horizontal scrollbar.
I have tried all possibilities but I cann't make it.

Pls help.

Regards
Kabs

0
Bobi
Telerik team
answered on 26 Nov 2009, 12:15 PM
Hi Kabs Hussain,

Thank you for the feedback. We are aware of this issue.
It is already fixed and the change will be reflected in the this week internal build which is tomorrow.

Regards,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Manny
Top achievements
Rank 1
answered on 08 Dec 2009, 11:00 PM
That forum does not work; server error when navigating to page
0
Miroslav
Telerik team
answered on 13 Dec 2009, 04:28 PM
Hi Manny,

I checked the forum link and indeed, it does not work anymore. The thread may have been converted to a support ticket. 

Are you seeing any issues with the scrolling in the TreeView?

Normally the vertical ScrollBar in the TreeView may not appear if it is placed in panels that do not constrain its size (for example if any of its parents is a  vertical StackPanel).

All the best,

Miroslav
the Telerik team

 


Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
TWT
Top achievements
Rank 1
answered on 04 Jun 2010, 05:38 PM
Telerik,

Is this resolved with the latest binaries?

thanks
0
Valentin.Stoychev
Telerik team
answered on 07 Jun 2010, 07:49 AM
Hi TWT,

We are currently not aware of any problems regarding the scrolling in the RadTreeView. Please let us know if you experience any.

Greetings,
Valentin.Stoychev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
TWT
Top achievements
Rank 1
answered on 10 Jun 2010, 04:34 PM
Maybe the issue is I'm not able to get an acurate height on the RadPanel with each is expanded with I have multiple expand is set to true.  I need to be able at run time set the size of the contents in the RadPanel and it seems not to work.  What is the best way to obtain this information?  thanks
0
Valentin.Stoychev
Telerik team
answered on 15 Jun 2010, 01:06 PM
Hi TWT,

Are you talking about the RadPanelBar control? I assume yes, if not please let us know.

In order to achieve what you want you have to set the VerticalAlignment to "Stretch" of the RadPanelBar. If this is not working - please open a new support ticket and attach a sample project where we can advise you better.

All the best,
Valentin.Stoychev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Rainer
Top achievements
Rank 1
answered on 03 Jun 2011, 12:59 PM
We have a Main page containing

<telerik:RadSplitContainer x:Name="radSplitContainerLeft" VerticalAlignment="Stretch" Orientation="Horizontal" InitialPosition="DockedLeft" telerik:DockingPanel.InitialSize="170,150" MaxWidth="600">
                         <telerik:RadPaneGroup IsDefaultItemSelected="True" SelectedIndex="0">
                            <telerik:RadPane Header="Entities">
                                    <StackPanel Orientation="Vertical" VerticalAlignment="Stretch">
                                    <BasicControls:EntitySelector  x:Name="entitySelector1" VerticalAlignment="Top" />
                                    <BasicControls:HierarchyTreeView VerticalAlignment="Stretch"/>
                                        
                                </StackPanel>
                            </telerik:RadPane>
                            <telerik:RadPane Header="Settings">
                                    <StackPanel Orientation="Vertical" Background="#FFF4F6FD" Margin="4">
                                        <BasicControls:ModelSelector x:Name="modelSelector1" VerticalAlignment="Top" />
<BasicControls:UserSettings x:Name="userSettings1" VerticalAlignment="Top" />
                                    </StackPanel>
                                </telerik:RadPane>
                        </telerik:RadPaneGroup>                           
                    </telerik:RadSplitContainer>


Our HierarchyTreeView includes the following:

<Grid x:Name="LayoutRoot" VerticalAlignment="Stretch"
          d:DataContext="{StaticResource ViewModel}">
        <telerik:RadBusyIndicator IsBusy="{Binding IsBusy}" BusyContent="{Binding BusyContent}" Visibility="Visible">
            <Grid>
                <telerik:RadComboBox Name="radComboBox1" Width="Auto" VerticalAlignment="Top"
                                 ItemTemplate="{StaticResource ComboBoxItemTemplate}"
                                 CanAutocompleteSelectItems="True" 
                                 IsFilteringEnabled="True" 
                                 EmptySelectionBoxTemplate="{StaticResource EmptyTemplate}" 
                                 SelectionBoxTemplate="{StaticResource ComboBoxItemTemplate}"                                 
                                 telerik:TextSearch.TextPath="Name"                                                                      
                                 SelectedItem="{Binding SelectedHierarchy, Mode=TwoWay}"
                                 ItemsSource="{Binding DerivedHierarchies}">
                </telerik:RadComboBox>               

                <telerik:RadTreeView Width="Auto"  Height="Auto"  VerticalAlignment="Top"                                        
                                     ItemTemplate="{StaticResource ItemTemplateParentChild}"
                                     ItemsSource="{Binding Path=HierarchyMembersAll,Mode=TwoWay,Converter={StaticResource ParentChildConverter}}"
                                     ItemsOptionListType="Default"
                                     IsOptionElementsEnabled="False"
                                     x:Name="TreeView2"
                                     SelectionMode="Multiple" IsLineEnabled="True"
                                     SelectedItem="{Binding SelectedHierarchyMember, Mode=TwoWay}"
                                     IsRootLinesEnabled="True" IsTriStateMode="True"
                                     Margin="0,20, 0, 0"
                                     />               
                
            </Grid>
        </telerik:RadBusyIndicator>
    </Grid>


I've added The VerticalAlignment="Stretch" to every possible container, but still I can't scroll vertically in TreeView2. Only horizontally.
We must have the controls inside a StackPanel, since their height may vary.
0
Petar Mladenov
Telerik team
answered on 08 Jun 2011, 02:10 PM
Hello Rainer,

The StackPanel measures itself with infinity. On the other hand, the RadTreeView has to be limited somehow in order to show its vertical ScrollViewer. You could try setting the MaxHeight property of the RadTreeView or placing it in Grid`s RowDefinition with explicit height set. You can also send us a runnable sample that we will investigate faster and provide you with a better suited advice. Thank you for your cooperation in advance.

Kind regards,
Petar Mladenov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Greivin
Top achievements
Rank 1
answered on 27 Oct 2011, 05:55 PM
Hi, I'm using a RadTreeView  in asp.net ajax and I need enable the scrollBar, I have checked the options in this post but it doesn't work for me.

Thanks
0
Petar Mladenov
Telerik team
answered on 01 Nov 2011, 01:13 PM
Hello Greivin,

 Do you actually mean RadTreeView for ASP.Net Ajax ? If so, why don't you post a ticket in the ASP forum?
If it is the Silverlight RadTreeView, could you please elaborate more on your scenario, any sample code will be highly appreciated? This way we would be better able to assist you. Thank you in advance.

All the best,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TreeView
Asked by
Ken
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Celeste
Top achievements
Rank 1
Bobi
Telerik team
Kabs Hussain
Top achievements
Rank 1
Manny
Top achievements
Rank 1
Miroslav
Telerik team
TWT
Top achievements
Rank 1
Rainer
Top achievements
Rank 1
Petar Mladenov
Telerik team
Greivin
Top achievements
Rank 1
Share this question
or