Set column to be ordered by id
Set column to be ordered by id

Hello,
I am using datatables on my website, and to make it easier to use it on many pages, I always use the same javascript code.
So I would like to use id of column to set the default column to be ordered.
Example: if column has id="default_sort", the sorting is made on this column. If this id doesn't exist, by default on first column.
Is there a way to do that ?
This discussion has been closed.
Answers
You would need to include the id in a column or in some orthogonal data that a sorting column can access.
Allan