DataTables JS : Quick way to created sorted tables in HTML

DataTables JS is a Jquery plugin to create HTML tables with sorting and paging. No need to code all the table functionalities, just set the data on the JS file and call the Datatables function.

Here’s the main page:
https://www.datatables.net/

Here’s a very basic example with HTML ( in a tr and td format ) and three lines of JavaScript.
https://www.datatables.net/examples/basic_init/zero_configuration.html

Here’s a server side processing using PHP. Notice that the HTML is reduced to Header and Footer of the table.
https://www.datatables.net/examples/data_sources/server_side.html

Here’s an example on how to use DataTables using JSON and Java.
http://stackoverflow.com/questions/24893158/getting-javascript-json-string-to-populate-datatable

And here’s a step by step example on how to use DataTables using JSON and Java
https://dzone.com/articles/how-create-jquery-datatable

Limitations

DataTables loads all data as retrieved and then it has the option to display it via paging. It does not yet support Server data retrieval by each page click.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s