Disable sorting when table header is clicked

Disable sorting when table header is clicked

frankensteeniefrankensteenie Posts: 2Questions: 1Answers: 0

Sorting will trigger only if sorting icon is clicked
hence when clicking the header sorting should not trigger?
Is there a way to do this?

what i've done so far

$('.mainTable').unbind('click.DT'); // this disabled the sorting for header click but also disable the icon sort click
$('.mainTable').find('th').off('click.sorting'); //does nothing

based on the image above i have an icon inline with the header
whenever I click the icon, it will trigger the sort then execute the icon functionality
I need to disable the sorting whenever I click the header.

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.