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

ScrollIntoViewAsync freezes

3 Answers 110 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marc Roussel
Top achievements
Rank 2
Marc Roussel asked on 29 Nov 2013, 02:06 PM

Hi people.


To your knowledge, what could cause the ScrollIntoViewAsync to freezes there ?  I tried in a reproduction project but with less events and it's not reproducible.  There's something in my project that make the ScrollIntoView freezes.



What I do to make it freezes is adding a new row, cancelling it and then copying an existing row and when I copy a row I have code that clone the object and add it to the collection, then I do rebind the grid and use the ScrollIntoViewAsync to go to that row.



If I just copy immediately without adding a new row, the ScrollIntoViewAsync will not freeze.  It's just when I do add a new row and cancel then my next operation of copy and scrolling freezes



3 Answers, 1 is accepted

Sort by
0
Marc Roussel
Top achievements
Rank 2
answered on 29 Nov 2013, 02:12 PM

I tried removing the code that scroll and what I see is that my copy isn't added to the collection or visually it's not appearing.  I'll try other things to isolate the culprit


0
Marc Roussel
Top achievements
Rank 2
answered on 29 Nov 2013, 06:08 PM

Well, it's not the ScrollIntoViewAsync the problem.  It looks like the grid is in some kind of coma when I click the "Click here to add a new row" and cancel it.  After that I'm unable to add a new object to my collection programmatically and have the grid showing it.


0
Marc Roussel
Top achievements
Rank 2
answered on 01 Dec 2013, 12:15 PM

I managed to find the cause.  It was because grid Items collection was a subset of the complete collection because at some point in code I did a grid.ItemSource = MyCollection.Where(...);







Tags
GridView
Asked by
Marc Roussel
Top achievements
Rank 2
Answers by
Marc Roussel
Top achievements
Rank 2
Share this question
or