Disable Paging but keep Sorting as is?
Disable Paging but keep Sorting as is?
moktik
Posts: 2Questions: 1Answers: 0
Hi,
In the table I've created, sorting and pagination are there by default. But when I disable paging as
"paging": false
Sorting also goes off. Why is that so?
I don't want paging but I want full sorting here. I tried bSort
also.
Also, sorting of a single column doesn't work for me. I tried
"order": [[ 2, "asc" ]]
but that too didn't work! Where am I going wrong?
I've imported these js & css:
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
<link href="https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css" rel="stylesheet"/>
<link href="https://cdn.datatables.net/plug-ins/1.10.7/integration/bootstrap/3/dataTables.bootstrap.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/plug-ins/1.10.7/integration/bootstrap/3/dataTables.bootstrap.js"></script>
This discussion has been closed.
Answers
Could you post the code for the table you are initialising?
I can take a look for you.
Thanks
Tom
Here you go!