Order by numer dont work ok
Order by numer dont work ok
pippuccio76
Posts: 19Questions: 10Answers: 0
Hi , i have a datatable with one field as this :
1 of 01-10-2017
2 of 01-10-2017
3 of 01-10-2017
4 of 01-10-2017
5 of 01-10-2017
6 of 01-10-2017
7 of 01-10-2017
8 of 01-10-2017
9 of 01-10-2017
10 of 01-10-2017
11 of 01-10-2017
if i click to sort the 10 and 11 are after 1 ther's a way to ordinat numerically ?
This discussion has been closed.
Answers
That is not numeric data. Can you re-design it in any way?
You can use
columns.type
and usenum
to sort your data numerically.For example:
Replace
0
intargets: 0
with zero-based index of your column.See this example for code and demonstration.
See more articles about jQuery DataTables on gyrocode.com.