Is there a way with dataTables to have it not show the sort icons for columns containing either an empty column heading or the words Edit or Delete.
As of right now I’m using this:
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [ 4,5 ]
}
Which works for 4,5 because those are the Edit and Delete columns but I”m thinking those might now always be the right numbers for the columns everytime plus in the fist column has an empty column heading because each row for that column contains a checkbox so I don’t need to sort by anything there.
It depends how the “Edit” or “Delete” is being added to the table. You can either do it before the datatables is initialised by finding the column number(s) and creating your own array to pass as “aTargets”, or by removing the icons after-the-fact if all you care about is “look”.
The first method requires us seeing your page.
The second method requires knowing what you’re using to display the “icons”. Standard init? bJQueryUI?
:contains is your friend