Hello,
I just finished converting my project from SL3/VS2008 to SL4/VS2010. The project uses MVVM/WCF not RIA services. In several places in the application I am using a RadGridView with a RadDataPager. Long story short I have the PageIndex property databound to a property in my ViewModel, and I use that value to pass back to the WCF service whevenver the associated QueryableCollectionView changes (which happens on any page or sort operation).
This worked fine in SL3.
In SL4 what happens is basically this:
1) PageIndex gets updated when the user changes pages to the appropriate index.
2) PageIndex gets set back to zero
3) The CollectionChanged event on the QueryableCollectionView is fired
4) The WCF service gets called with the PageIndex set to zero.
Result: paging is broken.
I figured this out by setting a break point on my PageIndex property in my ViewModel. It gets updated twice before CollectionChanged fires.
Any suggestions?
<
telerikns:RadDataPager
x:Name
=
"rdpPager"
Source
=
"{Binding CommunitiesView}"
PageIndex
=
"{Binding PageIndex, Mode=TwoWay}"
NumericButtonCount
=
"5"
DisplayMode
=
"All"
AutoEllipsisMode
=
"Both"
/>