Disable ordering on the first column

Disable ordering on the first column

lienkhuonglienkhuong Posts: 2Questions: 1Answers: 0
edited November 2019 in Free community support

hello, i want to disable ordering on the first column
i use wordpress and use plugin Inline Google Spreadsheet Viewer

my shortcode

[gdoc key=”https://docs.google.com/spreadsheets/d/W7pjg1L8VvpO36SjUfhSSMHMp67PsLNjWZKz1So/edit#gid=788544765″ query=”select B,H,I,J” datatables_dom=”flrtip” datatables_page_length=”100″ class=”stripe hover”]

and i use js:

$('#igsv-W7pjg1L8VvpO36SjUfhSSMHMp67PsLNjWZKz1So').dataTable( {
  "columnDefs": [
    { "orderable": false, "targets": 0 }
  ]
} );

but the first column not disable

how to fix it

Thanks

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Yep, that's all you should need - see here. It suggests that code isn't initialising the table - is something else doing it perhaps?

This discussion has been closed.