This is a migrated thread and some comments may be shown as answers.

How to Get Top Row

3 Answers 78 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Maulik Patel
Top achievements
Rank 1
Maulik Patel asked on 02 Nov 2011, 07:38 AM
Hi,

I want to get the top visible row in the gridview (after scrolling down some rows). Is there any way to get it? I can get the currently selected row information but not the top visible row.

Quick help is surely appreciated. 

Regards,
Maulik Patel

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 02 Nov 2011, 08:47 AM
Hi,

 Can you post more info about your scenario and why you need this?

Greetings,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Maulik Patel
Top achievements
Rank 1
answered on 02 Nov 2011, 09:24 AM
I want to preserve the user's last changes in the grid. When user scrolls down in the grid (say he has scrolled 10 rows down) and leave the page, I want to show the grid in the same state (10 rows scrolled) in the next visit. So, I was hoping to have "TopRow" or something similar that helps me to get the reference of the scrolled rows and save it user's settings.

Is the above information sufficient?

Regards,
Maulik
0
Vlad
Telerik team
answered on 04 Nov 2011, 01:56 PM
Hello Maulik,

 Why not use our PersistenceFramework to save the grid settings? You can get GridViewScrollViewer and save/restore VerticalOffset. You can get the scroll viewer using ChildrenOfType<>() extension method. 

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Maulik Patel
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Maulik Patel
Top achievements
Rank 1
Share this question
or