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

Auto Scroll to The Selected Item

2 Answers 920 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ahmed
Top achievements
Rank 1
Ahmed asked on 24 May 2014, 04:16 PM
Hi,

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

Thanks,, 

2 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 28 May 2014, 02:52 PM
Hello,

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.


Regards,
Yoan
Telerik
 
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.
 
0
Ahmed
Top achievements
Rank 1
answered on 28 May 2014, 05:37 PM
The attached property solution worked perfectly without any code behind.  

Thank you very much Yoan. 
Tags
GridView
Asked by
Ahmed
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Ahmed
Top achievements
Rank 1
Share this question
or