Disable Initial Sort
Disable Initial Sort
bryceray1121
Posts: 65Questions: 0Answers: 0
Hello,
What I'm trying to do is disable the initial sort for a single datatable. I have multiple data tables on the page but I want to set 1 of the tables up so that it does not sort on page initialization. However, I want the sort features to work if they are clicked on after the page initialization. The purpose of this is to allow me to be able to define the rows that initially appear at the top of the table.
I've tried this but I assume it does not work because bSort refers to a table as a whole instead of an individual column.
[code]
"aoColumnDefs": [
{"bSort":false, "aTargets" : ["dataTables_noIniSort"]}
]
[/code]
*With this code I added the class to every column in the table.
Thanks for your help.
What I'm trying to do is disable the initial sort for a single datatable. I have multiple data tables on the page but I want to set 1 of the tables up so that it does not sort on page initialization. However, I want the sort features to work if they are clicked on after the page initialization. The purpose of this is to allow me to be able to define the rows that initially appear at the top of the table.
I've tried this but I assume it does not work because bSort refers to a table as a whole instead of an individual column.
[code]
"aoColumnDefs": [
{"bSort":false, "aTargets" : ["dataTables_noIniSort"]}
]
[/code]
*With this code I added the class to every column in the table.
Thanks for your help.
This discussion has been closed.
Replies
Allan