Infinite scrolling display length

Infinite scrolling display length

tloachtloach Posts: 1Questions: 0Answers: 0
edited November 2010 in General
Is it possible to change the scroll length after the table is created? I have a table with about 150 columns that takes quite a while to draw. I'm willing to take a hit on page load to load 30-40 rows initially, but after that I want to only load 5-10 at a time to reduce the load time.

Replies

  • adamadam Posts: 11Questions: 0Answers: 0
    I'm not sure about chaining the columns available after the table has loaded. But if you set this to 10 and then add infinite scroll, your users can scroll down all 150 results in the one screen. This will mean that only 10 results are loaded at once.

    Are you using the server side implementation? This is much faster for larger data tables.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    You can set the 'settings' parameter "_iDisplayLength" to alter the number of records which are added to the table. $(...).dataTable().fnSettings._iDisplayLength = 5 for example.

    Allan
This discussion has been closed.