Datatable ordering issue

Datatable ordering issue

shahin_foxxshahin_foxx Posts: 3Questions: 1Answers: 0

i wanted to replace the parameters dynamical with my own parameters but it's not working.

$(function () {
var table = $('#myTable').DataTable();
table.order(["viewResult.sortedColumnIndex"," viewResult.sortedColumnDirection"])
.draw();
});

anyone can help me with that?

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin

    The array should be in the format [ integer, string ] where the string can be asc or desc. It looks like you are passing in two strings. They look like variables, and perhaps whatever server-side environment should be replacing them, but it doesn't look like it.

    Allan

  • jr42.gordonjr42.gordon Posts: 305Questions: 2Answers: 49
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin

    Agreed - closing this thread.

    @shahin_foxx - Please do not post duplicates.

This discussion has been closed.