I am working on datatable plugin in Jquery. And have to set the default column by which the data is sorted so I mean that :
I have a table with 4 columns and by default the data is sorted by column no 1, I want that the data should be sorted by column number 2 or 3.
How that can be done:
$('#tblMainTable').dataTable({
"bJQueryUI" : true,
"sDom" : 'R<"H"lfr>t<"F"ip<',
"aoColumns" : [
{"bSortable" : false},
null,
null,
null,
{"bSortable" : false},
{"bSortable" : false}
],
"aaSorting": [[ 2, "desc" ]]
});
I specified that in "aaSorting" but not getting the result.
Please shed some light?