Empty aaSorting setting causes error.

Empty aaSorting setting causes error.

andrew_mandrew_m Posts: 31Questions: 0Answers: 0
edited March 2009 in General
Hi Allan.

I tried to disable default sorting behavior, and add this peace of code to configuration - aaSorting: []. I got an error, "aaSort[aaSort.length - 1] is undefined" in _fnSort() function. Is it possible to disable default sorting at all?

Replies

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Hi Andrew,

    Yes indeed this should be possible and I made a small error in my changes when introducing aaSortingFixed which breaks this. I'll release a new beta shortly with a fix.

    Allan
  • andrew_mandrew_m Posts: 31Questions: 0Answers: 0
    Great! As usual :)
  • andrew_mandrew_m Posts: 31Questions: 0Answers: 0
    One more thing: i applied "bSort: false" setting to entire table, and it is impossible to do sorting, however, there is still class "sorting" applied to each head cell, which shows disabled sort arrows for the head cells. Is it correct behavior, or sorting arrows shouldn't appear at all in that case?
  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Hi Andrew,

    This behaviour would definitely be wrong. However, my feature enablement example (in both 1.4 and 1.5 beta) correctly don't apply these classes:

    http://datatables.net/1.5-beta/examples/basic_init/filter_only.html
    http://datatables.net/examples/example_filter_only.html

    Do you have a link to an example of the problem?

    Thanks,
    Allan
  • andrew_mandrew_m Posts: 31Questions: 0Answers: 0
    Allan, i can't provide a link right now, since my site is behind a proxy. My grid uses server-side datasource. Please to disable grid sorting in one of server-side examples of beta 5. If this behavior will not be reproduced, then i will build my own example.
  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Hi Andrew,

    Thanks for clarifying your setup. Indeed there was a bug when using server-side processing and applying the sorting classes. I've fixed this now and just re-released beta 6 with that fix.

    Thanks
    Allan
  • andrew_mandrew_m Posts: 31Questions: 0Answers: 0
    Thanks for so quick fix, Allan :)
  • andrew_mandrew_m Posts: 31Questions: 0Answers: 0
    Oh and i forgot to say that column filters state work excellent too :)
This discussion has been closed.