Some pages loading incorrectly

4 posts, 1 answers
  1. Mariusz
    Mariusz avatar
    24 posts
    Member since:
    Mar 2011

    Posted 05 Jul 2011 Link to this post

    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:

    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.
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 05 Jul 2011 Link to this post

    Hi Rafal,

    Can you try the following. Replace Telerik RadDataPager with the stock  toolkit DataPager and tell us what happens. Are the results different?

    We are looking forward to hearing from you.

    Kind regards,

    Ross
    the Telerik team
    Register for the Q2 2011 What’s New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
  3. DevCraft banner
  4. Answer
    Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 05 Jul 2011 Link to this post

    Hi Rafal,

    I almost forgot. Replace RadGridView with the stock DataGrid. In other words, don't use any Telerik controls and give your project a try. I really doubt that RadDataPager is the culprit, but I might be wrong.

    By looking at the code you have pasted, I suspect that the problem is coming from the DomainDataSource and its LoadSize settings. I am not 100% sure though. 

    Can you try your project with DataGrid+DataPager+DomainDataSource and tell us whether the behavior is the same?

    All the best,
    Ross
    the Telerik team
    Register for the Q2 2011 What’s New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
  5. Mariusz
    Mariusz avatar
    24 posts
    Member since:
    Mar 2011

    Posted 05 Jul 2011 Link to this post

    Thanks.
    It seems that the problem lays somewhere else on our side. We should have checked it at the very beginning.

    Best regards,
    RB
Back to Top