jscript error "number expected" when sorting on certain columns

jscript error "number expected" when sorting on certain columns

chrisesimpsonchrisesimpson Posts: 7Questions: 0Answers: 0
edited May 2009 in Bug reports
It seems to happen on the following line:

oSettings.aiDisplayMaster.sort(fnLocalSorting)

It's always the same columns in my table but there appears to be nothing special about the data in those specific columns.

Thanks

Chris

Replies

  • allanallan Posts: 56,837Questions: 1Answers: 9,035 Site admin
    This error crops up if DataTables thinks that your data is a number and it's actually a string. This can occur of data such as "2009-10-10". There is an error in the parsing of these string which I've fixed but not yet released (few other things to go in first!). Does this sound like what you might be encountering?

    If so you can work around it by setting the sType for the column to be "string". Or if you are interest I can post the fixed code.

    Regards,
    Allan
  • chrisesimpsonchrisesimpson Posts: 7Questions: 0Answers: 0
    Yes this sounds exactly like the problem. I'll give your suggested fix a go before I change the source.

    Thanks very much for the prompt response. This is a very nice component. I shall be spreading the word.

    Cheers

    Chris
  • chrisesimpsonchrisesimpson Posts: 7Questions: 0Answers: 0
    Thanks, that works great
This discussion has been closed.