This tutorial describes how to scroll a specific item of the RadListView by it's index into the visible portion the UI.
- All that you need to do is call the
RadListViewinstance with an valid integer object as the 'index' parameter. The code snippet bellow shows the described approach, note that the snippet assumes there is an RadListView instance with
id="listView"set in the XML.
let listView: RadListView = <RadListView>(frameModule.topmost().currentPage.getViewById("listView")); listView.scrollToIndex(50);
var listView = (frameModule.topmost().currentPage.getViewById("listView")); listView.scrollToIndex(50);
When scrolling the
RadListView to show a previously not visible item the default beahvior is that the item will be scrolled into the view either in the
Left position depending on the current
scrollDirection of the layout. You can easily change that default value by assigning the
scrollPosition to one of these values