Sort not working - don't understand why
Sort not working - don't understand why
Hi,
I tried to use sorting on a table I created starting from an html table.
I see "the arrows" that means sorting is enabled: when I click on them images changes, but
the ordering of the rows do not change.
As you will see from the configuration I'll post, I'm using ColVis and FixedColumns plugins.
[code]
var table_acct = $('#display').dataTable({
"oLanguage":{
"sShowAll": "Show all",
"sSearch": "Search:" ,
"sZeroRecords":"No records!"
},
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bSort": true,
"bInfo": false,
"bAutoWidth": false,
"bStateSave": true,
"iCookieDuration": 604800,
"sScrollX": "100%",
"sScrollXInner": "150%",
"bScrollCollapse": true,
"sDom": 'C<"clear">lfrtip',
"oColVis": {
"aiExclude": [ 0 ],
"buttonText":"Show/Hide" },
"aoColumns":[ {"bSearchable": true}, {"bSearchable": false},{"bSearchable": false},{"bSearchable": false},
{"bSearchable": false},{"bSearchable": false},{"bSearchable": false},{"bSearchable": false},
{"bSearchable": false},{"bSearchable": false},{"bSearchable": false},{"bSearchable": false},
{"bSearchable": false},{"bSearchable": false},{"bSearchable": false} ]
});
new FixedColumns(table_acct,{iLeftColumns:1, "iLeftWidth": 160});
[/code]
Do someone see something wrong in my configuration?
Thanks in advance to anyone who will answer.
Bye
I tried to use sorting on a table I created starting from an html table.
I see "the arrows" that means sorting is enabled: when I click on them images changes, but
the ordering of the rows do not change.
As you will see from the configuration I'll post, I'm using ColVis and FixedColumns plugins.
[code]
var table_acct = $('#display').dataTable({
"oLanguage":{
"sShowAll": "Show all",
"sSearch": "Search:" ,
"sZeroRecords":"No records!"
},
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bSort": true,
"bInfo": false,
"bAutoWidth": false,
"bStateSave": true,
"iCookieDuration": 604800,
"sScrollX": "100%",
"sScrollXInner": "150%",
"bScrollCollapse": true,
"sDom": 'C<"clear">lfrtip',
"oColVis": {
"aiExclude": [ 0 ],
"buttonText":"Show/Hide" },
"aoColumns":[ {"bSearchable": true}, {"bSearchable": false},{"bSearchable": false},{"bSearchable": false},
{"bSearchable": false},{"bSearchable": false},{"bSearchable": false},{"bSearchable": false},
{"bSearchable": false},{"bSearchable": false},{"bSearchable": false},{"bSearchable": false},
{"bSearchable": false},{"bSearchable": false},{"bSearchable": false} ]
});
new FixedColumns(table_acct,{iLeftColumns:1, "iLeftWidth": 160});
[/code]
Do someone see something wrong in my configuration?
Thanks in advance to anyone who will answer.
Bye
This discussion has been closed.
Replies
Allan
thank you very much for your answer!
Unfortunately at the moment I cannot share the page where the problem is, I'll try to reproduce the problem in another page that I will share here.
In the meanwhile, I ask one thing:
- Can the problem be related to the fact that I gave an ID property to every cell of the table?
Maybe DataTable use the same property to make sort or other opertions...
Thanks again,
bye
No - that won't cause DataTables any problems.
Allan