Disable scrolling to top when adding new item to bound collection

4 posts, 0 answers
  1. Manoj
    Manoj avatar
    15 posts
    Member since:
    Mar 2014

    Posted 09 Apr 2015 Link to this post

    Hi,

     

    When I add a new item to the bound collection in my view model the radgridview scrolls to the top on its own.

    How to prevent this from happening ? I saw a similar thread with no solution : http://www.telerik.com/forums/disable-scroll-on-changing-collection

  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 10 Apr 2015 Link to this post

    Hello Manoj,

    Generally, the ScrollBar is Reset as a CollectionChanged notification with action Reset is raised for the source collection. If the Action is Add or Remove, then it should stay as it is. Would you please subscribe for the CollectionChanged event and check what the e.Action it? 

    Regards,
    Dimitrina
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. Manoj
    Manoj avatar
    15 posts
    Member since:
    Mar 2014

    Posted 15 Apr 2015 in reply to Dimitrina Link to this post

    I am adding aggregate functions when data loaded event happens. Looks like that is causing the scroll back to top.

    I am now adding it only once initially. This solves the issue.

  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 15 Apr 2015 Link to this post

    Hi,

    Thank you for sharing the solution you came up with the community. 

    Regards,
    Dimitrina
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top