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

RadTreeView DLLs upgrade from V2009 to V2011 - Things not working the same

3 Answers 60 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Merav
Top achievements
Rank 1
Merav asked on 10 Aug 2011, 07:54 PM
Hi, 
I'm experiencing now the trial version of Telerik.Windows.Controls DLL V2011, in order to decide whether to upgrade from V2009,
and unfortunately encountered several problems which I'll appreciate your help solving them.

1. Can't select nodes in the hierarchical tree from code behind if the node isn't in the view,
Because the TreeViewItem is null after trying getting it from the ItemContainerGenerator:
var treeItem = (RadTreeViewItem)control.ItemContainerGenerator.ContainerFromItem(myVMObject);

And I'm using virtualizing

VirtualizingStackPanel.IsVirtualizing="True"  VirtualizingStackPanel.VirtualizationMode="Recycling"












2. When sometimes the TreeViewItem is not null, then trying to bring it into view, the previous code no longer works.
                        ItemsControl control = treeView;
                        control.UpdateLayout();
                        var treeItem = (RadTreeViewItem)control.ItemContainerGenerator.ContainerFromItem(myVMObject);
                        if (treeItem != null)
                        {
                                treeItem.Focus();
                                treeItem.IsSelected = true;
                                treeItem.IsExpanded = true;                          
                        }

3. By clicking on a node and then switching to other node,
sometimes the last clicked node, even that is selected, not visualy looks like selected,
and the previous one looks like it still selected.

 











Thanks in advance,
Merav


3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 15 Aug 2011, 03:55 PM
Hi Merav,

Regarding the first two issues, you can try to use the BringPathIntoView method. You can explore this blog post which is very good starting point. Please let us know if you need further assistance on this.
As for the "selection issue" is it possible for you to tell us the exact steps in reproducing this behavior, do you succeed to reproduce it in our demos here ? Thank you for your cooperation. 

Greetings,
Petar Mladenov
the Telerik team

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

0
Merav
Top achievements
Rank 1
answered on 24 Aug 2011, 10:04 AM
Hi Petar ,
Thanks for your reply,
The BringPathIntoView method does work, can you tell me why the previous way no longer works?
Is it because of the Virtualizing? I want to mention that I used it already with the old version.
Any way, the problems that remain unsolved are two:
1. The Expand and Collapse of a specific node that is selected are not always work,
    It's not consistent and I can't give a specific scenario for it.
2. The focus problem also not consist and I can't give any scenario for it too, 
    But sometimes a node is selected, and you click on another node, 
    And even that the second node is now the selected one (The right pane is showing it's details),
    Both nodes looks like selected.

I hope you'll be able to assist me,
Thanks,
Merav
0
Petar Mladenov
Telerik team
answered on 29 Aug 2011, 03:07 PM
Hello Merav,

 Is it possible for you to isolate the issues in a sample project so that we would be able to investigate them better? There are some known issues when the tree is virtualized and selection or focus-related issues but we need more info or code (or captured video) in order to confirm that your issues are known bugs. Thank you for your cooperation and understanding. 

Regards,
Petar Mladenov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
TreeView
Asked by
Merav
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Merav
Top achievements
Rank 1
Share this question
or