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

RadTreeViewItem.RootItem not returning correct item

1 Answer 33 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 17 Mar 2010, 05:26 PM
The RadTreeViewItem.RootItem property used to return an item's highest ancestor node (as of version 2009.1103), but in the current version (2010.0309) it always returns a reference to itself. Does anyone else see this behavior?

Here's a very simple example:
    <StackPanel> 
        <telerikNavigation:RadTreeView x:Name="tree"/> 
        <TextBlock x:Name="msg"/> 
    </StackPanel> 
 

And the code behind:
        private void Window_Loaded(object sender, RoutedEventArgs e) 
        { 
            RadTreeViewItem item1 = new RadTreeViewItem() { Header = "item1" }; 
            RadTreeViewItem item2 = new RadTreeViewItem() { Header = "item2" }; 
            RadTreeViewItem item3 = new RadTreeViewItem() { Header = "item3" }; 
 
            tree.Items.Add(item1); 
            item1.Items.Add(item2); 
            item2.Items.Add(item3); 
 
            // item3.RootItem returns item1 in 2009.1103 version (CORRECT) 
            // item3.RootItem returns item3 in 2010.0309 version (WRONG) 
            msg.Text = "item3.RootItem is " + item3.RootItem.Header.ToString(); 
 
            tree.ExpandAll(); // <-- This also doesn't seem to be working 
            item1.ExpandAll(); // <-- Neither does this 
        } 
 

1 Answer, 1 is accepted

Sort by
0
Tihomir Petkov
Telerik team
answered on 22 Mar 2010, 11:15 AM
Hello Will,

Thank you for the feedback. The same problem you observed was recently reported by another user. It seems that with the 2010 Q1 release we have introduced a bug that affects the RadTreeViewItem.RootItem property. The issue is still not schedule for a specific release, but we will definitely get to it as soon as our schedule allows us. You can follow the status of the issue in our public issue tracking system via the link below:

http://www.telerik.com/support/pits.aspx#/public/silverlight/1431

Best wishes,
Tihomir Petkov
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.
Tags
TreeView
Asked by
Will
Top achievements
Rank 1
Answers by
Tihomir Petkov
Telerik team
Share this question
or