Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35270

how to pass a variable to aaSorting AND how to check aaSorting

$
0
0

I want to get a list from ajax and assign this value to aaSorting. Like var templateSortOrder = []; $.ajax({ type: "GET", url: getSortOrderUrl, dataType: 'json', success: function (result) { templateSortOrder = result; } }); console.log(templateSortOrder); // is [[2,'asc'], [3,'desc']] var table = $('#reportTable').DataTable({ ... "aaSorting": templateSortOrder, ... });
It doesn't work :(


Viewing all articles
Browse latest Browse all 35270

Trending Articles