SelectedItem jumps to Top

4 posts, 0 answers
  1. Matthias Bibo
    Matthias Bibo avatar
    72 posts
    Member since:
    Mar 2010

    Posted 21 Oct 2013 Link to this post


    Hi,

    since the new release I am having a problem with the RadTreeView. If i select an Item in the Tree it alwas jumps to top of the View. This behaivor is new. I saw there is a new Property AutoScrollToSelectedItem but no matter how I set this property the behavoir stays the same.
    Is there some other new feature in the TreeView im am missing?

    Best Regards
    Matthias
  2. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 24 Oct 2013 Link to this post

    Hello Matthias,

    Could you please provide us a bit more info about the issue? What do you mean by "If i select an Item in the Tree it always jumps to top of the View"? Do you mean the scroll viewer scrolls to TreeView top edge when you select an item? If that is the case, does it happen every time or just on initial selection?

    Also, could you please send us a sample project demonstrating the issue? This would be the best and fastest way to assist you.

    I am looking forward to hearing from you.

    Regards,
    Hristo
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
  4. Matthias Bibo
    Matthias Bibo avatar
    72 posts
    Member since:
    Mar 2010

    Posted 18 Nov 2013 Link to this post


    Hello,

    sorry for taking this long to reply, but i just haven't had the time...

    I've narrowed the issue down to a code behind call of "BringPathIntoView" method. I am calling this method in Code behind because the CurrentItem can be set from different locations. If the method is called the CurrentItem allways jumps to the top even if it is already in the view.

    What i want is the Tree to bring the Item into view if it is not already in the view, otherwise do nothing.

    Setting the BringItemIntoViewMode dosent change this effekt either. And the
    AutoScrollToSelectedItem Property dosent seem to work at all....

    Best Regards,
    Matthias Bibo
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 21 Nov 2013 Link to this post

    Hello Matthias,

    When the Tree is Virtualized AutoScrollToSelectedItem works only for Items that are generated. But when virtualization is on the items that are outside the ViewPort are not generated. Here is the API comment of the property:

    Gets or sets a value indicating whether the selected RadTreeViewItem should be scrolled into the viewport. When using virtualization this property works only for realized RadTreeViewItem(s).

    However, the BringPathIntoView should do exactly what you expect - bring the item only if needed (if it is not in the VeiwPort). Since we are not aware of similar existing issue, could you please isolate this one in a separate project and send it in a Support Thread. This way we would be much better able to investigate it and advice you faster.

    Thank you in advance for your cooperation.


    Regards,
    Petar Mladenov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top