Auto Scroll to The Selected Item

3 posts, 0 answers
  1. Ahmed
    Ahmed avatar
    16 posts
    Member since:
    May 2014

    Posted 24 May 2014 Link to this post


    Is it possible to make the GridView auto scrolls to the selected item? I'm doing everything in MVVM and avoid any code behind.

  2. Yoan
    Yoan avatar
    1215 posts

    Posted 28 May 2014 Link to this post


    You can check the Scroll to a particular row or column help article for a reference. If you want to have your code-behind clean, the way to go is with an Attached behavior. Here you can find information about it. You will write the attached behavior only once. Then you can enable this attached behavior on a RadGridView. Here is a very nice article about event handling with attached behaviors. You have the code in one place only. All you will need to do is something like this:

    <RadGridView EnableMyAttachedBehavior="True"/>

    and then let the attached behavior kick in and do its job.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. Ahmed
    Ahmed avatar
    16 posts
    Member since:
    May 2014

    Posted 28 May 2014 in reply to Yoan Link to this post

    The attached property solution worked perfectly without any code behind.  

    Thank you very much Yoan. 
Back to Top