You can customize the sequence, how to order the data inside your table by default. Therefore extend the shortcode wirth the argument “orderby“. The argument contains the concerned columns.

Syntax

[[jsdatatable cat=YourCategory cols=YourColumn1,YourColumn2,YourColumn3,YourColumn4 orderby=YourColumn4,YourColumn2]]

EXAMPLE:

[[jsdatatable cat=YourCategory cols=ZIP,City,Street,lastname,firstname,Street orderby=City,lastname,firstname]]

 Defaults

Without the argument “orderby” within the shortcode, the first column will be used to sort the data.

Notes

If you explicit want to define “descending-order (dsc) / ascending-order (asc)“, please use the order-argument.


ORDERBY ⇒ Some live examples

Please click on the links below and check out the difference:

[jsdatatable tag=example-orderby cols=pos,title,comment head=”POS,Use this shortcode:,Note” searching=off]