We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How does ScrollToRowIndex works if there is grouping?

Thread ID:





132627 Sep 12,2017 10:07 PM UTC Sep 13,2017 11:36 AM UTC Xamarin.Forms 1
Tags: SfListView
Asked On September 12, 2017 10:07 PM UTC

when there is grouping like below
  - group 1
     -item 1 
     - item 2
 - group 1
      item 3
  - group 3
      item 4
      item 5 
      item 6

if i want to scroll to item 5 using ScrollToRowIndex method which index number should be used?
1) is parameter index for this method start from 0 or 1.
2) ScrollToRowIndex(index) - index parameter includes group items or not? so if it includes, it should be 8 (if starting index 1) 7 ( if starting index 7)

can you please clarify all these confusions? please also extend your documentation, it is not very clear. 


Dinesh Babu Yadav [Syncfusion]
Replied On September 13, 2017 11:36 AM UTC

Hi Emil 
Sorry for the inconvenience. 
Is parameter index for this method start from 0 or 1. 
Parameter index for ScrollToRowIndex method starts from 0. 
ScrollToRowIndex(index) - index parameter includes group items or not?  
When grouping feature is used in list view, group header item index is also included in index parameter. However, you can get the desired item index by passing the underlying data in DisplayItems.IndexOf method as like below code example. 
Code Example[C#]: 
int itemindex = listView.DataSource.DisplayItems.IndexOf(listView.SelectedItem); 
(listView.LayoutManager as LinearLayout).ScrollToRowIndex(itemindex); 
We will update the same in our documentation too within 2017 Volume 4 main release. 
Please let us know if you require further assistance. 
Dinesh Babu Yadav 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon