GetItemByPath and Hierarchical Virtualization

4 posts, 0 answers
  1. Paul Brun
    Paul Brun avatar
    41 posts
    Member since:
    May 2010

    Posted 01 Dec 2011 Link to this post

    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 

  2. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 06 Dec 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. Paul Brun
    Paul Brun avatar
    41 posts
    Member since:
    May 2010

    Posted 06 Dec 2011 Link to this post

    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
  5. Paul Brun
    Paul Brun avatar
    41 posts
    Member since:
    May 2010

    Posted 06 Dec 2011 Link to this post

    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
Back to Top