Hide sort icon for details-control column.
Hide sort icon for details-control column.
Sachchin
Posts: 4Questions: 1Answers: 0
Hello Techies,
I used datatable to create dashboard and used row expand-collapse to display additional details.
Here whenever I click on other columns for sorting - the sort icon reappears.
It reappears above the datatable on IE 11 and appears normally on chrome.
IE screenshot.
I would like to remove the sort icon for details-control column.
Please help me
This discussion has been closed.
Answers
Use
columns.orderable
to disallow user ordering on that column.Allan
I used it
"columnDefs": [
{ 'orderable': false, "width": "2%", 'targets': 0 },
But the sort icon is visible when I try to sort other columns.
Would be able to post all the table initialisation code here, or better still, create a live example/fiddle for it.
Cheers,
Colin
Make sure you have also set the
order
option to be something other than the first column, since it will default to the first column.Allan