none
LS HTML - Paging not working anymore RRS feed

  • Question

  • Hi All,

    I have a LS HTML app that loads records from a SQL database into a table. I have the query set to 'Support paging'.

    The problem is when you scroll down to the bottom and keep scrolling the little spinning wait icon shows up but it never loads any more records. I have tried setting the No. of items... to 10, 20, 100... no dice. If I turn off paging all records load fine.

    I used F12 to capture the network data and this is the main query being sent up:

    Request GET /MyData.svc/vwMyView?$filter=true&$orderby=Employee_Name&$top=20 HTTP/1.1

    That top=## changes to whatever I have the paging set to. Also no further requests are sent once you scroll down to load more... but I'm not sure how all of that works.

    I could just leave paging off, but when 200+ records are being loaded it can slow down.

    Any suggestions?

    Thanks, Jeremy


    Jeremy

    Tuesday, October 30, 2018 5:23 PM

Answers

  • I figured it out. Another quirk of LightSwitch I guess.

    The issue seemed to have been the Height setting on the Table itself. The height was set to a Fixed Size, the users wanted all records to show on one page with a vertical scroll bar on the side. I changed the Height to Stretch to Container, the container being the Rows Layout (tab), and the height for the Rows took care of the Table for me. Paging works perfect now.

    Maybe whatever 'trigger' that LS uses to start a page load is obscured somehow by fixing the table height?

    Anyway, problem solved, moving on to the next one :). Thanks for looking!


    Jeremy


    Thursday, November 8, 2018 2:44 PM