Sorting with leading zeros

Sorting with leading zeros

gjb01gjb01 Posts: 2Questions: 0Answers: 0
edited July 2011 in Bug reports
I use this great script to sort batting stats on a large website, but when sorting batting average, ".000" is considered greater than say ".250". I also noticed that ".085" is greater as well, which makes me wonder if leading zeros are the problem. Can anyone help?

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    have you set an sType on the column?

    http://datatables.net/ref#sType

    you can also write your own custom sorting routines if you need something special that isn't supported by default
  • gjb01gjb01 Posts: 2Questions: 0Answers: 0
    sType worked perfectly, thanks!
This discussion has been closed.