Problem with sorting

Problem with sorting

tcardinaltcardinal Posts: 31Questions: 9Answers: 0
edited September 2011 in Plug-ins
I have a table with teh follwoing initialisation:




$("#TfdOrderTable_3").dataTable ({
"aoColumns": [
null,
{"sType": "string"},
{"sType": "uk_date"},
{"sType": "uk_date"},
{"sType": "uk_date"},
{"sType": "uk_date"},
{"sType": "uk_date"},
{"sType": "string"},
{"sType": "string"},
{"sType": "numeric"}]
})
});

Extended_sort.js is the plugin code for the uk date sort.

The string fields sort as expected, but the other columns don't sort at all.

any ideas?

Replies

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    Hi tcardinal,

    The basic idea looks like it should be absolutely fine. I wonder if there is a Javascript error occurring somewhere if there is no sorting at all happening? Possibly something that the date sorting plug-in is expecting isn't in the required format and it is throwing an error? If you have a look at the Javascript console in your web-browser it will tell you.

    I've put together a very basic little example here: http://live.datatables.net/ojomil/edit which shows how it should work. If you click on the "render" button you'll get the table which is sortable on all columns.

    Regards,
    Allan
  • tcardinaltcardinal Posts: 31Questions: 9Answers: 0
    Thanks Allan. A quick look in the debugger did the trick there was some formatting around the values.
  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    Cool - no worries, and good to hear it's working well for you now :-)

    Allan
This discussion has been closed.