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

Scroll bar problem

2 Answers 123 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ye HaoChen
Top achievements
Rank 1
Ye HaoChen asked on 08 May 2013, 03:11 AM
Hi,

This is treeview code:
<telerik:RadTreeView Grid.Row="2" IsRootLinesEnabled="False" IsLineEnabled="True" ItemsSource="{Binding DisplayDataList}" PreviewSelectionChanged="RadTreeView_PreviewSelectionChanged" telerik:StyleManager.Theme="{StaticResource MetroStyle}" FontFamily="{StaticResource font_global}" HorizontalContentAlignment="Stretch">
<telerik:RadTreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding TreeNodeList}">
<TextBlock FontSize="16" Text="{Binding TreeNodeID}" />
</HierarchicalDataTemplate>
</telerik:RadTreeView.ItemTemplate>
</telerik:RadTreeView>

And this is tree node modle code:
public class AccountTreeNode
    {
        private Object treeNodeObject;
        public Object TreeNodeObject
        {
            get { return treeNodeObject; }
            set { treeNodeObject = value; }
        }
 
        private Type treeNodeType;
        public Type TreeNodeType
        {
            get { return treeNodeType; }
            set { treeNodeType = value; }
        }
 
        private ObservableCollection<AccountTreeNode> treeNodeList;
        public ObservableCollection<AccountTreeNode> TreeNodeList
        {
            get { return treeNodeList; }
            set { treeNodeList = value; Notify("TreeNodeList"); }
        }
    }

In the case of treeview's scrollbar displayed. The scrollbar will be uncontrolled movement when clicked one tree node in the treeview.
And tree node can be selected more than one.

If the scroll bar isn't displayed, the above problems would not have occurred.

2 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 10 May 2013, 12:57 PM
Hello Ye HaoChen,

Unfortunately I'm not sure how to reproduce this issue and this is why I can't tell for sure what might be causing it. This is why I attached a sample solution which you can modify to better reproduce the issue.

Also, please consider apply UI Virtualizaiton on the RadTreeView control if you're displaying a large amount of items.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Ye HaoChen
Top achievements
Rank 1
answered on 14 May 2013, 02:54 AM

My WPF radcontrol's version is 2012 SP1.
This is a very early version. Perhaps you fixed it in a later version.

And thank you for your suggestion. 

Tags
TreeView
Asked by
Ye HaoChen
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Ye HaoChen
Top achievements
Rank 1
Share this question
or