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

SelectedItem jumps to Top

3 Answers 58 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Matthias Bibo
Top achievements
Rank 1
Matthias Bibo asked on 21 Oct 2013, 07:35 AM

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

3 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 24 Oct 2013, 08:13 AM
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 >>
0
Matthias Bibo
Top achievements
Rank 1
answered on 18 Nov 2013, 02:23 PM

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
0
Petar Mladenov
Telerik team
answered on 21 Nov 2013, 11:24 AM
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 >>
Tags
TreeView
Asked by
Matthias Bibo
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Matthias Bibo
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or