Select menus alphabetical order

Select menus alphabetical order

DutchSpeedDutchSpeed Posts: 5Questions: 0Answers: 0
edited April 2013 in General
Why is the content of DataTables individual column filtering using select menus not in alphabetical order?

See for example:
http://www.datatables.net/examples/api/multi_filter_select.html

Or should I change something in my script?

Thanks in advance.

Replies

  • allanallan Posts: 63,520Questions: 1Answers: 10,473 Site admin
    Just call `sort()` on the data source array for the select element?

    Allan
  • DutchSpeedDutchSpeed Posts: 5Questions: 0Answers: 0
    I've added this [code]oTable.fnFilter( sort($(this).val()), i );[/code] but that doesn't work.

    Or must I place it somewhere else?
  • allanallan Posts: 63,520Questions: 1Answers: 10,473 Site admin
    I was rather meaning the array `sort()` method. Something as simple as `oTable.fnGetColumnData(i).sort()` should do it.

    Allan
  • DutchSpeedDutchSpeed Posts: 5Questions: 0Answers: 0
    [quote]allan said: I was rather meaning the array sort() method. Something as simple as oTable.fnGetColumnData(i).sort() should do it.



    Allan[/quote]

    Thanks, it's working perfectly now! :)
This discussion has been closed.