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

Disable scroll on changing collection

6 Answers 217 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sergey
Top achievements
Rank 1
Sergey asked on 22 Jul 2013, 11:57 AM
Hello, I have problem with my radGridView. When I delete or add new rows, gridview scroll items to the top. But I don't need it. How can I fix it ?

6 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 25 Jul 2013, 08:50 AM
Hi Sergey,

Can you please try to set GridView's IsSynchronizedWithCurrentItem property to "True"? Please let me know about the result.

Regards,
Yoan
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 >>
0
Sergey
Top achievements
Rank 1
answered on 26 Jul 2013, 11:17 AM
Hello, no it don't work. I use RadObservableCollection and QueryableCollectionView. GridView bind to the QueryableCollectionView. When I need remove, add or edit item I call RadObservableCollection.SuspendNotification(). After editing items I call RadObservableCollection.ResumeNotification(). And after gridView sometimes try to set selectedItem to null (2 times). I attached call stack.
When gridView.count've changed the gridview scroll to the top.

Thanks
0
Sergey
Top achievements
Rank 1
answered on 26 Jul 2013, 01:10 PM
And when selectedItem had been deleted, gridView set null as selectedItem. Can I do that selectedItem will be set by next item in grid?
0
Yoan
Telerik team
answered on 31 Jul 2013, 10:59 AM
Hello Sergey,

In order to investigate and resolve the problems, would it be possible to share with us more details on your exact implementation? It would be great if you can send me a small sample with dummy data in order to investigate the issue locally.

Thank you in advance.

Regards,
Yoan
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 >>
0
Sergey
Top achievements
Rank 1
answered on 10 Oct 2013, 06:23 PM
Hello. I found problem. I do full object replace in RadObservableCollection. If I do it for object which is selected, SelectedItem set to first item. Can I freeze selectedItem without any code (I have MVVM pattern)? Thanks
0
Yoan
Telerik team
answered on 15 Oct 2013, 03:14 PM
Hello Sergey,

I'm afraid that you can not achieve this only in XAML. However, 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. 

Regards,
Yoan
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
Sergey
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Sergey
Top achievements
Rank 1
Share this question
or