Disable/enable Scroller for individual tables ?

Disable/enable Scroller for individual tables ?

jan_goyvaertsjan_goyvaerts Posts: 31Questions: 0Answers: 0
edited April 2014 in DataTables 1.9
I have a large data use case where Scroller *seems* to be a performance bottleneck. Especially those with +30 columns. Scrolling down the rows is just a frustrating experience. BUT it gets less so when showing the classic pagination buttons. At least, at what I hope. :-)

However, Scroller remains the preferred way of handling large data sets. My intention is to keep Scroller working by default. But disable it for tables with more than 30 columns.

The problem is that I need to keep both the .js files into the same page. Doing so Scroller will automatically register with DT. But in some cases it shouldn't.

Is there a way to disable selectively Scroller for specific tables ?

Replies

  • allanallan Posts: 63,491Questions: 1Answers: 10,470 Site admin
    Not once it has been initialised, but if you know the data set size before you initialise the table, just don't initialise Scroller :-)

    Allan
  • jan_goyvaertsjan_goyvaerts Posts: 31Questions: 0Answers: 0
    How does one NOT do that ? :-)
  • jan_goyvaertsjan_goyvaerts Posts: 31Questions: 0Answers: 0
    It wouldn't be the obscure sDom setting, would it ? :-)

    Enabled => rtiS
    Disabled => rtip

    Right ?
  • jan_goyvaertsjan_goyvaerts Posts: 31Questions: 0Answers: 0
    Okay - is working ! It's the sDom lore alright ! :-)

    Thanks for the hint.
  • allanallan Posts: 63,491Questions: 1Answers: 10,470 Site admin
    The `S` option is all that is need to enable Scroller via sDom . Having it in means it is enabled, Not having it in means it is not.

    The other letters also define their own specific features. `p` for paging for example.

    Allan
This discussion has been closed.