A10 sorting before A1
A10 sorting before A1
Sorry, if this has already been answered, searched for about an hour and couldn't find anything.
Basically I have a list of table rows that I would like to sort. Ultimately what happens is this..
A10:Program Name
A11:Program Name
A1:Program Name
A2:Program Name
A3:Program Name
...
A7:Program Name
A8:Program Name
A9:Program Name
I figured just putting a 0 in front of the single digit as such 'A01' would solve it, but it doesn't.
Any insight as to what I'm doing wrong here. I'm new to this (clearly ;).
Thanks.
Replies
Sorry.. new to the formatting to.. the A10, A11, A1 etc would be listed down the page.
Look here for the API.
https://www.datatables.net/plug-ins/sorting/
Specifically take a look at the natural sort plug-in.
The issue is that your data is a combination of string and numeric data, while the built in sorting functions in DataTables do one or the other - not both.
Allan