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.
Unfortunately, activation email could not send to your email. Please try again.

Scroll to top

Thread ID:





119127 May 13,2015 05:49 AM May 18,2015 06:34 AM WinRT 3
Tags: SfDataGrid
Asked On May 13, 2015 05:49 AM

Hi ,

I was just wandering is there any way I could "scroll to top" row of my choice?
ScrollIntoView just isn't enough for what I need right now.
Can anyone anyone help me with this one?

Thank you.

Gobikrishnan Murugesan [Syncfusion]
Replied On May 14, 2015 08:27 AM

Hi Sarma,
Thank you for using Syncfusion products.
We analyzed your queryand you can achieve “scroll to top” by using ScrollInView() method also.For you reference we have shared a code snippetas follows:
Code Snippet:
If your scenario about ScrollToTop is different from above one, please share some more information about your requirementasthis would be helpful forus toprovideabetter solution.
Gobikrishnan M​

Replied On May 15, 2015 12:09 PM

Thank you for your reply,

but I have just now realized how unclear I was regarding this question...

So here the issue at hand:
- let's say I have 150 row in my datagrid
- my issue is to  have row index 55 set to Top of my datagrid
something like 
this.syncgrid.ScrollToTop(new RowColumnIndex(55,0));

ScrollInView method will move my records, but will not necessarily move my 55 record to the top of the datagrid.

Hope this makes it clearer now.

Gobikrishnan Murugesan [Syncfusion]
Replied On May 18, 2015 06:34 AM

Hi Sarma,

Thank you for your update.

We analyzed your query and you can achieve your requirement like “scroll to top” by using ScrollInView() method and ScrollLineIndex property. Please find the code snippet as follows :

Code Snippet:

//Scroll to particular row index

this.syncgrid.ScrollInView(new RowColumnIndex(RowIndex, 0));

//After scrolling, need to set corresponding row index as first visible index in view.

this.syncgrid.GetVisualContainer().ScrollRows.ScrollLineIndex = RowIndex;

We have also prepared the sample based on this and please find the sample under the following location:


Please let me know if this solution helps you.


Gobikrishnan M​


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.

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.