Sorting Issue

Sorting Issue

AllanSPalmerAllanSPalmer Posts: 3Questions: 0Answers: 0
edited May 2009 in General
Hi,

I have a table with data in the format of XXX-XXXXX-XXX where X is any integer 0-9. When using the DatatTables plugin on data that isn't in this format everything works great, but this format causes a "Number expected" error. I'm currently using the 1.4.3 plug-in.

Any ideas on how to get around this?

Thanks alot, and great product.

Allan

Replies

  • AllanSPalmerAllanSPalmer Posts: 3Questions: 0Answers: 0
    Alright, answered my own question. Apparently reading IS important. For anyone who might suffer from my same problem (i.e. not sorting, not reading the documentation) here is how you get around this.

    "aoColumns": [
    { "sType": "string" },
    null,
    null
    ]

    Thanks again for the great product!
  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Hi Allan,

    Answered your own question - nice one :-).

    This is actually a bug in DataTables which I've just fixed in my development version and will release soon. Unfortunately it currently thinks that "XXX-XXXXX-XXX" is a number, because it's looking for '-' to be anywhere and any number of times, rather than just at the start... So your working around is the best way at the moment to work around this issue.

    Regards,
    The other Allan
This discussion has been closed.