161
rated 0 times
[
163]
[
2]
/ answers: 1 / hits: 29495
/ 12 Years ago, sun, october 14, 2012, 12:00:00
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<Hlfr>t<Fip<',
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?
More From » jquery