Saturday, February 6, 2016

HTML table sorting, search and pagination

Hey guys,

Have you tried to make a dynamic plsql tabular report? did you face some issues with pagination, column sorting and searching?

Now it's super easy and in few seconds you can implement:

1- Include the required libraries.
//cdn.datatables.net/1.10.10/css/jquery.dataTables.min.css
//cdn.datatables.net/1.10.10/js/jquery.dataTables.min.js

2- initialize the library.

$(document).ready(function(){
    $('#myTable').DataTable();
});

3- Specify the table id and use it:
<table id="myTable">
.
.
.
</table>

4- Enjoy it: