【发布时间】:2016-04-01 06:38:25
【问题描述】:
是否可以根据 numeric item 在数据表中同时包含 numeric and string items 的列中的值对 numeric item 进行排序?
我试过columnDefs:
[{ type: 'natural', targets: [0,1] }]
但它不起作用。任何帮助表示赞赏。
【问题讨论】:
-
也许是您的数据示例?
-
如果您想定位第一列和第二列,您需要加载natural 插件并使用
targets: [0,1](而不是0.1)。 -
我尝试了 numchar 并更改了插件 [link] stackoverflow.com/questions/15363042/datatables-sorting-varchar。不成功。想根据数值排序,如 1 1a 1b 2 3 4a 5 等
标签: sorting datatables