-1

I am using bootstrap 3.3.7 and datatables 1.5.2. At present I have a table where I want the data to appear in order and I don't want it sortable by the user. So I set all columns to be sort false by putting "orderable": false in all column defs. This stops sorting, but the very first column the sort icon in the column remains. What do I need to do to hide the sort icon in this first field?

Edit: OK this is just getting downvoted. What am I asking wrong in this question?

Patrick Foy
  • 272
  • 2
  • 12
  • 1
    possible duplicate of [this question](https://stackoverflow.com/questions/4964388/is-there-a-way-to-disable-initial-sorting-for-jquery-datatables) – Royts Jun 28 '18 at 06:16
  • My own googling did not turn up this thread, thank you so much! that has solved my problem and removed the sort icon! – Patrick Foy Jun 29 '18 at 20:37

2 Answers2

0

In your program only shorting icon display but work perfectly. The icons is defined as background : url(..) on the CSS classes. Disable them by :

.sorting, .sorting_asc, .sorting_desc {
    background : none;
}
Ajay Jangra
  • 174
  • 1
  • 13
  • I've seen this suggestion before but adding this to my CSS sheet doesn't seem to have the anticipated result, to stop the sort icon from appearing. I have even tried using '!important" to prioritize it but is has also not solved it. – Patrick Foy Jun 29 '18 at 20:33
0

Sytor's response above solved it. This thread has the full explination: Is there a way to disable initial sorting for jquery DataTables?

I'm only replying here because I can't mark his response as an answer.

Patrick Foy
  • 272
  • 2
  • 12