Steps to reproduce:
1. TreeListView should contain enough items, so scroll showed up
2. Scroll down to the middle or to the end
3.Collapse/Expand any item
AR: Scroll jumps to top (or to the middle)
ER: Scroll stays on the same place, so we can see collapsed/expanded item
Scroll is jumping even if we just put some content in CellTemplate:
The described behavior occurs because you are changing the GridViewCell Height / MinHeight. This is expected because the TreeListView measures its items by checking their RowHeight. For example when you dynamically change the Height of the GridViewCell the TreeListView doesn't check if the ActualRowHeight for each row has changed (because the TreeListtView would be too slow). When there is no RowHeight specified the TreeListView uses a DefaultRowHeight = 25 to calculate the position of the items in the viewport. In order to return to the default behavior you can set the RowHeight property of the TreeListView.
I hope this helps.
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
In my case the row height varies based on the cell content... so I cannot pre-determine the RowHeight for the TreeListView control.
How do I ensure the scroll position is correctly calculated?
answered on 03 Dec 2014, 04:40 PM
Unfortunately there aren't any other workaround other than the one mentioned above.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
We too have same issue.Is this problem can't be solved other than this? Every time when we expand one row it is going to top of the RadTreeListView and this behaviour is not good when we have so many rows and again we have to manually scroll till the expanded row.
answered on 27 Aug 2019, 10:13 AM
The only viable solution we can offer is to ensure all of the control's rows have the same height, which can be done via the RowHeight property, as Boris suggested. I'm afraid there is no other feasible approach for handling the scenario where the rows have varying heights.
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.