Where am I going wrong with columnDefs?

Where am I going wrong with columnDefs?

InnovaMattInnovaMatt Posts: 13Questions: 7Answers: 0
edited December 2018 in Free community support

I'm trying to disable sorting on the edit & delete columns in this table (the unnecessary sorting icons appear to be widening the columns):

I've tried to follow the columnDefs documentation and here's my code, with the relevant lines commented out currently; the datatable script stops working as soon as I included them:

I'd be very grateful for any pointers as to where I am coming unstuck.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736
    Answer ✓

    the datatable script stops working as soon as I included them:

    This indicates an exception error occurred stopping the Javascript script. Take a look at your browser's console and you should see a syntax error. You need a comma at the end of this line:
    "bStateSave": true,

    Kevin

  • InnovaMattInnovaMatt Posts: 13Questions: 7Answers: 0
    edited December 2018

    Thanks for your response kthorngren.

    Silly me on the comma, but I also had to change the number targeting to a class target.

This discussion has been closed.