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

Scrolling after adding a new row (using MVVM)

3 Answers 268 Views
GridView
This is a migrated thread and some comments may be shown as answers.
srikanth
Top achievements
Rank 1
srikanth asked on 20 Jun 2013, 11:19 AM
Hello!

How can i scroll through the GridView, after adding a new row, and make this row focus?
I'm adding new row into ObservableCollection which is binded to grid!

maybe i can achieve something like in this docs, but with my default values
http://www.telerik.com/help/wpf/gridview-managing-data-add-new-entries.html

Please suggest me!!!
Thanks and Regards!!!

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 21 Jun 2013, 01:53 PM
Hello,

You could scroll to the newly added row, using a method which is called ScrollIntoViewAsync(). You also can pass an action as parameter and this action will be performed when all requested scroll operations are completed. 

I hope this helps.

Regards,
Didie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
srikanth
Top achievements
Rank 1
answered on 22 Jun 2013, 09:30 AM
Hello Didie !

In docs you use code behind to use your method, but how i could do it in MVVM way??
Could you give me some small sample, where i can see how to implement it?

Thanks in advance!!!
0
Dimitrina
Telerik team
answered on 26 Jun 2013, 01:26 PM
Hello,

If you want to have your code-behind clean, the way to go is with an attached behavior. You can check our WPF demos on how to use attached behavior with RadGridView.

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
srikanth
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
srikanth
Top achievements
Rank 1
Share this question
or