locked
Intelligently dealing with display of a large number of rows in the HTML client RRS feed

  • Question

  • Wondering how others are approaching the problem of a LS table with 2000 rows in it, managing that data on the page.  I know LS does infinite scrolling, so it doesn't all come across the wire at once, but is there a way to page data?  For instance, if someone wants to see the final 20 rows of the table, infinite scroll will take a while.  There's also the problem of 2000 rows taking up a lot of browser memory and resources.

    I have text boxes on the screen to help filter the query, and encourage that in the screen messaging, but it's still possible they'll ask for all 2000 rows.

    Saturday, October 3, 2015 5:30 AM

Answers

  • Jim, that is unfortunately a downside to the built-in LS table control as it overloads the DOM with large numbers of rows. For that reason we use the Kendo UI grid directly bound to the Backend OData datasource - in other words, it does not use a visual collection. We find that it handles tens of thousands of records without any issue as the DOM is not bloated. You may also get the same benefit form the SyncFusion and other 3rd party grids.

    Regards, Xander. My Blog


    • Edited by novascape Saturday, October 3, 2015 9:32 AM
    • Proposed as answer by Angie Xu Wednesday, October 21, 2015 7:41 AM
    • Marked as answer by Angie Xu Thursday, October 22, 2015 1:40 AM
    Saturday, October 3, 2015 9:31 AM

All replies

  • Jim, that is unfortunately a downside to the built-in LS table control as it overloads the DOM with large numbers of rows. For that reason we use the Kendo UI grid directly bound to the Backend OData datasource - in other words, it does not use a visual collection. We find that it handles tens of thousands of records without any issue as the DOM is not bloated. You may also get the same benefit form the SyncFusion and other 3rd party grids.

    Regards, Xander. My Blog


    • Edited by novascape Saturday, October 3, 2015 9:32 AM
    • Proposed as answer by Angie Xu Wednesday, October 21, 2015 7:41 AM
    • Marked as answer by Angie Xu Thursday, October 22, 2015 1:40 AM
    Saturday, October 3, 2015 9:31 AM
  • Just to add to my comment above, we use virtual paging with the Kendo UI grid as well, so it automatically loads the next page as you scroll down.

    Regards, Xander. My Blog

    Saturday, October 3, 2015 9:35 AM
  • I have an enhancementt to the msls scripts that exposes collection paging and page requests. With this it is possible to do traditional grid page and paging controls. It is on the backlog to post and October should see this finally. Dave

    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    Saturday, October 3, 2015 12:32 PM
  • Thanks guys.  Dave, I'll be looking forward to your enhancements and checking them out.
    Monday, October 5, 2015 6:29 AM
  • Yes, looking forward Dave. I take it that your enhancement will work with the standard LS Table control?

    Regards, Xander. My Blog

    Monday, October 5, 2015 9:23 AM
  • I use a separate screen for all search parameters so the user can configure their query and then go back to the browse screen to display the results.  Either that or you can disable automatic execution of your query (but beware of side effects of that).  Getting the last 20 rows might best be done by sorting on the applicable column headers or using an OrderBy in the query.  If you really need to see all x0000 rows, it might be best to include export to excel functionality via web api.  Unfortunately, none of the above is a very easy setup, but all do work well.
    • Edited by Hessc Monday, October 5, 2015 4:33 PM
    Monday, October 5, 2015 4:31 PM