Making a column not sortable removes header text
Making a column not sortable removes header text
MapleThunder
Posts: 4Questions: 2Answers: 0
I want to make a column in my table not be sortable, so I have added the following into the table definition:
"bProcessing":true,
"bServerSide": true,
"sAjaxSource": '/spectrometer/search',
"iDisplayLength": 10,
"aoColumnDefs": [{
"bSortable": false,
"aTargets": [1]
}],
"aoColumns": [{ .. multiple columns here ..}]
This removes the sorting on the desired column, but it also blacks out the text in the header. I can highlight the text to see it, but it isn't white like the rest of the column headers.
This discussion has been closed.
Answers
I'm afraid I don't know why that would happen. My only guess is that there is something funny with the CSS. Right click on the element and select "Inspect" and that will show you the styles that are being applied to that cell.
Allan
This is how the element gets generated. Does the
sorting_disabled
orsorting
class change the text colour at all ?That entirely depends upon the CSS being used which is why I suggested checking that. The default DataTables CSS doesn't, but without a link to the page I can't say what is happening on your page.
Allan