bSort: Can I turn it off and on?

bSort: Can I turn it off and on?

danwdanw Posts: 4Questions: 0Answers: 0
edited August 2010 in General
I've got lots of data I'm loading into a table with fnAddRows; potentially thousands of rows.

I have to disable absolutely everything when I initialise the table, but would like to turn some things once the data has been loaded.

I've tried to simply set bSort to true after loading the data, but it doesn't seem to reenable sorting. I've tried following it with fnDraw, too, but no luck.

Has anyone come across this before?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Are you disabling the features at initialisation time in order to try and optimise the display? DataTables' features can't be enabled and disabled at run time - so this won't really work. There initialisation path through the code can be significantly different depending on which features are enabled during the initialisation, and providing the ability to turn them on and off at run time would at a lot more code to DataTables.

    If it's running too slow with your thousands of rows, you could try using server-side processing, which will cope with many millions.

    Allan
This discussion has been closed.