Wrong order rows
Wrong order rows
Hello,
Today I noticed another thing with DataTables: If I don't "enable" datatables for a table (i mean the table is raw, just html, like "
") the records order is correct, as they arrive from db. As soon as I "enable" datatables for the table (I mean var table = $('#tableList').dataTable({........) the order of the records changes in a wrong way,for example the first record becomes third, the second becomes fourth, ecc.
Is this a known issue or bug ? How can it be solved ?
Thankx,
Adrian2007
Answers
sorry, I forgot to insert the quotes for the code....in the first line there should be "(i mean the table is raw, just html, like
<table>...</table>
I think the problem is "bSort": true . If I set this parameter to false the order of the rows is correct, as they arrive from db.
Yes, if you leave ordering enabled (
ordering
) then DataTables will order the data using its built in sorting. Useordering
(or the legacy bSort option if you want to use the legacy options) to disable that behaviour.Allan