Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4160
Paging not working properly
posted

Hello

I have a webgrid that uses LoadOnDemand(xml) and Paging (also xml). When a page link is pressed, the "loading" cursor is shown, but after a while the new page is not displayed - I still see page 1. The grid is bound at runtime to a hierarchical dataset (two tables). By the way, loading on demand the second band's rows do work.

What could be wrong?

Private m_objDS As New DS_MyTypedDataSet
Private m_strConnectionString As String

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        m_strConnectionString = "Data Source=MyServer; Initial Catalog=MyDB;User ID=sa; Password=xyz;"      

        UltraWebGrid1.DisplayLayout.Pager.AllowPaging = True
        UltraWebGrid1.DisplayLayout.Pager.PageSize = 20

        LoadDataSet()

        UltraWebGrid1.DataSource = m_objDS
        UltraWebGrid1.DataBind()

    End Sub 

Thanks a lot.

Parents
  • 1414
    posted

    EMosocosoCam,

    This may be way off base, but it is a problem I have noted in a different fashion - sort of...

    I found that if I set the PageSize property to something larger than the default (50 records) than the number of visible rows was still 50 records.  That is, if I set the PageSize to 500, than I would see one page of 50 records.  Very annoying.  But, even more annoying, the page index selector (you are using links, I used the combo box option) would respect my coded PageSize and give me the option to pick a page of records based on 500 records per page.  Thus, I would not see the 450 records between the end of page 1 - that is the 50 records displayed - and the beginning of page 2.  Likewise with further pages.

    Even more annoying, my testing data was not as large as the production data. 

    I reverted back to the defaults.  I kinda want the larger settings because the app in question is on a fast intranet so the bandwidth would support the data.  Also, the customer routinely deals with datatables in the area of a 100 records and the requirement to page induces some error rate.

    Maybe setting the PageSize property to less than default (20 rather than 50) confuses the control as well.  Try using the default and check if the expected data presents.  If so, request a bit more help on this site - I wuold like a solution.  If not, well it was an idea, eh...

Reply Children