aoColumnDefs "bSortable": false does not remove the sort icon and functionality

aoColumnDefs "bSortable": false does not remove the sort icon and functionality

gastoncsgastoncs Posts: 8Questions: 1Answers: 0

Hi I just download the new 1.10, I try to remove the column sort but it does not seam to work, the functionality and the icon is still there.

Replies

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    bSortable has been superceded in 1.10. Read the docs:

    http://datatables.net/upgrade/1.10-convert

  • gastoncsgastoncs Posts: 8Questions: 1Answers: 0

    Ho. ok thank you!

  • gastoncsgastoncs Posts: 8Questions: 1Answers: 0
    edited May 2014

    I try this but it keeps the sorting functionality, the only difference is that when I sort the first column it deletes the content.

     oTable1.dataTable({
                    "bPaginate": false,
                    'bInfo':false,
                    'bFilter': false,
                    "bProcessing": false,
                    "aaData": $rows,
                    "columnDefs": [
                        { "orderable": false, "targets": 0 }
                    ],
                    "aaSorting": [[ 3, "desc" ]],
                    "aoColumns": [
                        { "mDataProp": "nxnumber"},
                        { "mDataProp": "fname"},
                        { "mDataProp": "lname"},
                        { "mDataProp": "forum_role"},
                        { "mDataProp": "status"},
                        {
                            "mDataProp": null,
                            "sClass": "link",
                            "sDefaultContent": "<button name='viewInfo' class='button'   href='#'>View</button>",
                            "sWidth": "10px",
                        }
                    ],
    
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Both bSortable and columns.orderable should work. Here is a trivial test case showing that to be the case: http://live.datatables.net/fusurev/1/edit .

    Can you please link to a test case (as noted in the forum rules) showing the problem.

    Allan

  • gastoncsgastoncs Posts: 8Questions: 1Answers: 0

    I want to first of all thank you for sharing your amazing project to the community..
    I will love to give you a link but its in the company internal portal. I am working to set it up on JSFIDDLE as I am not familiar. I try what you suggested but it does not work, the sort icon keeps there and when i click it it deletes the tables body, if I click on an other field the body appears again I am not sure what it is, it was not like that since i change it to 1.10.0.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    I'm afraid I would need to be able see a page showing the problem to be able to offer any help with this one I think.

    Allan

  • gastoncsgastoncs Posts: 8Questions: 1Answers: 0

    Thanks! Allan let me see if I can do something

This discussion has been closed.