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

GetItemByPath and Hierarchical Virtualization

3 Answers 29 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Paul Brun
Top achievements
Rank 2
Paul Brun asked on 01 Dec 2011, 05:27 PM
First the context: 
- I have a treeview that is bound to an ObservableCollection (Hierarchical).
- The TreeView has IsVirtualizing set to true and mode set to Hierarchical
- We have an ItemTemplate that consists of an UserControl icon and Textblock
- Above the treeview is a textbox and when we enter text in the textbox, any text entered will search the collections and any items that
  contain those characters will be displayed in a grid view flat list.

If we select an item in the grid view, we need the ability, to have that item highlighted when we return to treeview. We have no problem highlighting the item when the item was already expanded in the treeview. However, if it was not visually present, we want the ability to expand/highlight the item accordingly.

I have tried ExpandItemByPath, GetItemByPath with no luck. I have tried different path separators with no luck.

How can I achieve my intended result?

Paul 

3 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 06 Dec 2011, 10:20 AM
Hi Paul Brun,

I suppose you have read the following blogpost http://blogs.telerik.com/silverlightteam/posts/11-01-12/treeview-bringintoview.aspx , but in case you didn't I think it worths to give it a look.

Regarding to the points you have described I would like to ask you few questions:
1) Are you using SingleExpandPath property? If you are, this could be causing the issue. Try to remove it.
2) Are you using Animations? If you are, this may bring the wrong item into view.
3) Have you tried using the Recycling virtualization mode?

If the issue persists, I would like to ask you to isolate it in simple test application so we could investigate it in detail.

Regards,
Hristo
the Telerik team

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

0
Paul Brun
Top achievements
Rank 2
answered on 06 Dec 2011, 02:56 PM
I am not familiar with the SingleExpandPath property and it is doubtful it has anything to do with the other two either. I will try to provide a reproducible solution and post it with the support ticket I opened.

Cheers,
Paul
0
Paul Brun
Top achievements
Rank 2
answered on 06 Dec 2011, 06:01 PM
I have since resolved the issue due to the path not being properly formed and did not include the item I wanted to display.

Paul
Tags
TreeView
Asked by
Paul Brun
Top achievements
Rank 2
Answers by
Hristo
Telerik team
Paul Brun
Top achievements
Rank 2
Share this question
or