This question is locked. New answers and comments are not allowed.
Hello,
we are using RadGridView with RadDataPager and we've met the following problem:
If we switch to the next page using "next page" button or "specific page number" some pages are full, and some contain only a few elements. These "empty" pages are loaded immediately, without calling service for data. However if we move backwards (from the last page), all pages are loaded correctly.
If we do as follows:
1. We start at the first page
2. We move to the second page
3. a) We move to the third page
3. b) We move back to the first page
This is what we get:
1. Full page (in our case 15 elements)
2. Full page, but the first two elements are the same as the last two of the first page
3. a) Only two elements (probably the two from the second page, which were pushed by the two elements from the first page)
3. b) Almost full page, with the last two elements missing...
Obviously, if we move straight (after application starts) to the page 3 for the first time ( skipping second page ), page is loaded properly.
But if we move back to page two, then it contains the 2 elements from page one, page one does not contain those elements any more, and page 4 contains only 4 elements (last elements pushed from pages 2 and 3)
Method returning elements:
Definition of the pager:
Domain data source code:
Best regards.
we are using RadGridView with RadDataPager and we've met the following problem:
If we switch to the next page using "next page" button or "specific page number" some pages are full, and some contain only a few elements. These "empty" pages are loaded immediately, without calling service for data. However if we move backwards (from the last page), all pages are loaded correctly.
If we do as follows:
1. We start at the first page
2. We move to the second page
3. a) We move to the third page
3. b) We move back to the first page
This is what we get:
1. Full page (in our case 15 elements)
2. Full page, but the first two elements are the same as the last two of the first page
3. a) Only two elements (probably the two from the second page, which were pushed by the two elements from the first page)
3. b) Almost full page, with the last two elements missing...
Obviously, if we move straight (after application starts) to the page 3 for the first time ( skipping second page ), page is loaded properly.
But if we move back to page two, then it contains the 2 elements from page one, page one does not contain those elements any more, and page 4 contains only 4 elements (last elements pushed from pages 2 and 3)
Method returning elements:
public IEnumerable<Invoice> GetCustomerInvoiceList(int customerId, int sellerId) { (...) return this.ObjectContext.InvoiceSet.Include("InvoiceLine") .Include("TaxSummaryLine") .Include("Customer") .Where(i => i.SellerILN == customer.Gln) .OrderBy(i => i.Date); }Definition of the pager:
<telerik:RadDataPager Grid.Row="2" x:Name="InvoicesPager" Source="{Binding Data, ElementName=CustomerDataSource}" DisplayMode="All" PageSize="15"/>Domain data source code:
<riacontrols:DomainDataSource x:Name="CustomerDataSource" QueryName="GetCustomerInvoiceList" AutoLoad="True" LoadSize="15"> <riacontrols:DomainDataSource.DomainContext> <context:CustomerDomainContext /> </riacontrols:DomainDataSource.DomainContext> <riacontrols:DomainDataSource.QueryParameters> <riacontrols:Parameter ParameterName="customerId" Value="{Binding CustomerId}" /> <riacontrols:Parameter ParameterName="sellerId" Value="{Binding SellerId}" /> </riacontrols:DomainDataSource.QueryParameters> <i:Interaction.Triggers> <ei:PropertyChangedTrigger Binding="{Binding RefreshTrigger}"> <ei:CallMethodAction MethodName="Clear" /> <ei:CallMethodAction MethodName="Load" /> </ei:PropertyChangedTrigger> </i:Interaction.Triggers> </riacontrols:DomainDataSource>Best regards.