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

AutoScroll in RadGridView?

1 Answer 698 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Bradley
Top achievements
Rank 1
Bradley asked on 08 Dec 2015, 04:22 PM

Is there some kind of property on the RadGridView that will make it scroll to the bottom of the list when a new record is added?  I'm binding the "ItemsSource" to an ObservableCollection.  Then, in my ViewModel, I'm adding rows.  I'd like the grid to scroll to the bottom automatically, rather than requiring me to add the record and then execute a "ScrollToEnd" on the "GridViewScrollViewer".  If there is no such property, what would be the best event to tie into to make this happen (i.e. so that I could contain this code to the View rather than contaminate my ViewModel)?  Yes, I could also add an event handler to the CollectionChanged of the ObservableCollection, but that that feels redundant somehow.  (Also, from my testing, it leaves the grid one row behind, since it fires before the row is actually rendered to the grid.)

Thanks!

Brad.

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 11 Dec 2015, 11:25 AM
Hello Bradley,

There is no such property currently available, but you can have a look at the Adding New Entries section of the RadGridView documentation.You can then use the GridView's ScrollIntoView method on the newly-inserted object as described in this article.

Here's another helpful article that shows how you can scroll to a particular row or column of the GridView.

Regards,
Dilyan Traykov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Bradley
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or