Disable sorting when clicking on headers
Disable sorting when clicking on headers
Can I disable sorting when clicking on the header of a column without disable sorting on that column? What I mean is, I want to still be able to sort using that column manually using something like
oTable.fnSort([[2,'asc']]);
Thanks in advance,
Boris Zakharin
oTable.fnSort([[2,'asc']]);
Thanks in advance,
Boris Zakharin
This discussion has been closed.
Replies
Allan
$('TH').unbind('click.sorting');
seems to be working for my purposes so far.
Allan
I'm looking for the same functionnality, i tried $('TH').unbind('click.sorting'); it did't work for me.
@cce i tried $('th').unbind('click.DT') and it works perfectly thanks :)
now what i'm looking for is how to re-bind again the click, is there any way to that, i thought $('th').bind('click.DT') could work but it doesn't.
any suggestion would be appreciated
Thanks
Allan
oTable.fnSortListener( $('thead.theadergray th'),0);
this sort always by the first item th, event if when we click on another th. the sort is always done on the first th, what i want is to sort by the clicked th, is there any way to tell the plugin to sort by all those th nodes, like that for example :
oTable.fnSortListener( $('thead.theadergray th'),0,1,2,3,4,5);
Thanks a lot Again Allan
for(var i=0; i< oTable.fnSettings().aoColumns.length; i++){
oTable.fnSortListener($('thead.theadergray th:eq('+i+')'), i);
}
Thanks guys for the great work ;)