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:

POSUse this shortcode:Note
02jsdatatable CAT=all COLS=Logo,Manufacturer,Vehicle,Model,Year,Write-Upthe same listing, but without orderby
01jsdatatable CAT=all COLS=Logo,Manufacturer,Vehicle,Model,Year,Write-Up ORDERBY=Manufacturer,Vehicle,Yearfirst put the Manfactures into order and inside each Manufacturer order the data by the vehicle and year