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.
Syncfusion Feedback

Scroll to top

Thread ID:

Created:

Updated:

Platform:

Replies:

119127 May 13,2015 09:49 AM UTC May 18,2015 10:34 AM UTC WinRT 3
loading
Tags: SfDataGrid
Sarma
Asked On May 13, 2015 09:49 AM UTC

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 12:27 PM UTC

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:
this.syncgrid.ScrollInView(newRowColumnIndex(0,0));
If your scenario about ScrollToTop is different from above one, please share some more information about your requirementasthis would be helpful forus toprovideabetter solution.
Thanks,
Gobikrishnan M​


Sarma
Replied On May 15, 2015 04:09 PM UTC

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 
<pre>
this.syncgrid.ScrollToTop(new RowColumnIndex(55,0));
</pre>

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 10:34 AM UTC

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:


http://www.syncfusion.com/downloads/support/forum/119127/simple_sfGrid_winrt-876981452.zip


Please let me know if this solution helps you.


Thanks,

Gobikrishnan M​


CONFIRMATION

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.

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

;