How to Get Top Row

4 posts, 0 answers
  1. Maulik Patel
    Maulik Patel avatar
    36 posts
    Member since:
    Mar 2010

    Posted 02 Nov 2011 Link to this post

    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
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 02 Nov 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. Maulik Patel
    Maulik Patel avatar
    36 posts
    Member since:
    Mar 2010

    Posted 02 Nov 2011 Link to this post

    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
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 04 Nov 2011 Link to this post

    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 >>

Back to Top