I'm pretty new to JQuery Datatables,
I'm attempting to retrieve two information about the Datatable
not sure how I should approach this (use jquery to find the column index or does Datatables have an API that allows me to retrieve this information.
thanks a lot :D
I'm not sure what do you mean by "retrieve", but if you define your datatable
like this:
myDataTable = $('#my-table').dataTable({
.
.
.
});
You have access to its setting via:
myDataTable.fnSettings();
See also:
For example to get an array of columns sorted columns, try:
myDataTable.fnSettings().aaSorting;
http://datatables.net/docs/DataTables/1.9.0/DataTable.models.oSettings.html#aaSorting
the method order() returns an array of arrays containing index and direction sorting .
take a look at api
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With