Sortable Columns - How to switch off completely

Sortable Columns - How to switch off completely

SQLGuruSQLGuru Posts: 14Questions: 2Answers: 0
edited November 2012 in General
Hi,

I would like to switch off sorting functionality.
I found the code to do this on a column by column basis, but is there no option to simply say "switch this functionality off" ?
I need this as I do not know how many columns will be returned from the database.

Thanking You!

Replies

  • allanallan Posts: 63,532Questions: 1Answers: 10,475 Site admin
    Use bSort .

    Allan
  • SQLGuruSQLGuru Posts: 14Questions: 2Answers: 0
    thank you!! that seemed easy enough...
    is there a simple method to switch off the ability to click on the column headers??
  • allanallan Posts: 63,532Questions: 1Answers: 10,475 Site admin
    That was it - it disables sorting. You can keep sorting enabled and use bSortable to define specific columns to be sorted.

    You might find the full list of parameters in the documentation useful: http://datatables.net/ref

    Allan
This discussion has been closed.