hiding sort order icon?

hiding sort order icon?

cdrwf150cdrwf150 Posts: 6Questions: 0Answers: 0
edited January 2011 in General
Is there a way to hid the sort order icon but still have client sorting?

I dynamically load data into a table through various ajax calls and want to the data to be sorted as it's added to the table but don't want the user to be able to click to sort nor see the sorting order graphic. "bSort": false, hides the graphic but also then blocks "aaSortingFixed": [[ 5, "asc" ]] from working. However when bSort is not false I can see the graphic in the header but it then sorts correctly as data is dynamically added.

Thanks!

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    There sure is - just remove the image references in the CSS, but the event will still remain. Another option is:

    [code]
    "aoColumnDefs": [
    { "bSortable": false, "aTargets": [ "_all" ] }
    ]
    [/code]
    which will disallow sorting on all columns.

    Allan
  • cdrwf150cdrwf150 Posts: 6Questions: 0Answers: 0
    Thanks! That did the trick. I had tried { "bSortable": false, "aTargets": [1,2,3,... ] } earlier but it didn't seem to work. Didn't know about _all.

    Great plugin!
This discussion has been closed.