This question is locked. New answers and comments are not allowed.
I have an issue with the DataPager when used with the VirtualQueryableCollectionView.
When paging the DataPager creates the correct number of pages and allows me to correctly navigate through them. When changing pages the VirtualQueryableCollectionView loads the data as expected, this is populated in the list box as expected. The list box moves to the correct page location but is not displaying just the page size, its displaying all records from that point.
If I change from the ListBox to the telerik RadGridView the grid view displays 5 items as expected.
In my XAML page i have...
In my data model I something like the following...
Any ideas as to what i'm doing wrong here.
Cheers
Stephen
When paging the DataPager creates the correct number of pages and allows me to correctly navigate through them. When changing pages the VirtualQueryableCollectionView loads the data as expected, this is populated in the list box as expected. The list box moves to the correct page location but is not displaying just the page size, its displaying all records from that point.
If I change from the ListBox to the telerik RadGridView the grid view displays 5 items as expected.
In my XAML page i have...
<t:RadDataPager x:Name=
"dataPager"
Source=
"{Binding MyDataSource}"
PageSize=
"5"
NumericButtonCount=
"10"
AutoEllipsisMode=
"Both"
/>
<ListBox ItemsSource=
"{Binding PagedSource, ElementName=dataPager}"
/>
In my data model I something like the following...
MySource =
new
VirtualQueryableCollectionView<SomeObject> { LoadSize = 30, VirtualItemCount = 100 };
MySource.ItemsLoading += (s, e) =>
{
_dataManager.GetMyData(e.StartIndex, e.ItemCount).CompletedWithOutErrors += operation =>
{
var tempData = operation.Entities.Single();
if
(tempData.TotalCount != MySource.VirtualItemCount)
{
MySource.VirtualItemCount = tempData.TotalCount;
}
MySource.Load(e.StartIndex, tempData.DataItems);
};
};
...
public
VirtualQueryableCollectionView<SomeObject> MySource {
get
;
set
; }
Any ideas as to what i'm doing wrong here.
Cheers
Stephen