Items are being re-ordered

Items are being re-ordered

jvc123jvc123 Posts: 12Questions: 4Answers: 0

I have a c# view into which I pass a list of items, I have noticed that the code below reorders the items by the first column displayed on the page. If I comment out the lines below the order of the items remains unchanged.

Do I specifically need to set the order with this "order": [[1, "asc"]] ?

$('#venueTable').DataTable({
"dom": 'fl<"customToolbarItems">ti',
lengthMenu: [[-1,10, 20, 50, 100], ["All",10, 20, 50, 100]],
});

Answers

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951
    edited April 15

    The order docs explain that the default order of the table is the first column which is index 0 not 1. The docs also show to use order: [] if you don't want Datatables to initially order the table.

    Kevin

Sign In or Register to comment.