Sorting Issue

Sorting Issue

28.vivek.s28.vivek.s Posts: 69Questions: 0Answers: 0
edited November 2010 in General
Hi Allan,

i have problem regarding to sorting.
My table is getting sorted o pageLoad,even if, i have disable bSortable property for all column in my table.
actually i have sorted my data before rendring it onto page and first time i want to display them as they are.
after that user can sort it,but because of this plugin my data gets sorted on page load.
i don't know whether its bug or not...?
but please suggest me that what to do?, to prevent by-default sorting. here is my code

[code]
var oTable = jQuery('#CacheSearchResultsTable').dataTable( {
"aoColumns": [
{ "bSortable": false},
{ "bSortable": false},
{ "bSortable": false},
{ "bSortable": false},
{ "bSortable": false},
{ "bSortable": false},
{ "bSortable": false},
{ "bSortable": false}
],
"sDom": '<"top"p<"clear">>rt<"bottom"ip><"clear">',
"bInfo": false,
"bAutoWidth": false ,
"bStateSave": false,
"iDisplayLength":5000
});
[/code]

Replies

  • 28.vivek.s28.vivek.s Posts: 69Questions: 0Answers: 0
    hi Allan,

    Please suggest me what to do in this situation....
    i tried a lot but didn't get any solution...
    i am stuck at this point.
    please help me out...

    Thanks
    Vivek
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    To disable sorting use bSort ( http://datatables.net/usage/features#bSort ). To keep sorting enabled but disable initial sorting use aaSorting as an empty array.

    Allan
  • 28.vivek.s28.vivek.s Posts: 69Questions: 0Answers: 0
    Thanks alot Allan.
    It's working
This discussion has been closed.