Format numbers like 9.x, 10.x and so on
Format numbers like 9.x, 10.x and so on
Heart1010
Posts: 21Questions: 2Answers: 0
Hi,
I have a column which has version numbers in it like "8.x", "9.x", "10.x" and so on.
How can I sort it like a number (the number whichs stands in front of that ".x").
Tried type numeric or numeric-fmt (from http://next.datatables.net/reference/option/columns.type) but that doesn't work.
Thanks
I have a column which has version numbers in it like "8.x", "9.x", "10.x" and so on.
How can I sort it like a number (the number whichs stands in front of that ".x").
Tried type numeric or numeric-fmt (from http://next.datatables.net/reference/option/columns.type) but that doesn't work.
Thanks
This discussion has been closed.
Replies
Allan
[code]{ "type": "natural", "targets": [ 1,2 ] }[/code]
---- old ---
How to enable that type to more than one column?
[code] "columnDefs": [{ type: "date-eu", targets: 3 },
{ "orderable": false, "targets": 4 },
{ "searchable": false, "targets": 4},
{ "type": "natural", "targets": 2 }],
[/code]
Above works, but now I want to also have type natural on targets 1?
Tried adding a new line but that doesn't work.
[code] "columnDefs": [{ type: "date-eu", targets: 3 },
{ "orderable": false, "targets": 4 },
{ "searchable": false, "targets": 4},
{ "type": "natural", "targets": 2 },
{ "type": "natural", "targets": 1}
],
[/code]
Allan