eisenbraun / columns

A jQuery plugin that converts JSON data into searchable, sortable, HTML tables
http://eisenbraun.github.io/columns
MIT License
105 stars 47 forks source link

force numerical sorting #27

Closed kaxel closed 7 years ago

kaxel commented 8 years ago

Hello! I am sorry if this was covered somewhere but I can't find an answer.

I am using columns to build some simple data tables, and it seems like the default sort treats everything as a string. so I sort by 'count' DESC (arrow down)

screen shot 2016-06-01 at 2 37 34 pm

and I get 98, 950, 900, and 90 in that order. I need that to look like 950, 900, 98 and then 90.

Am I right to think that the only way to do this is is to override the default sorting by writing a custom plugin? Or is there a way to specify type in the schema somewhere? Thanks in advance.

kaxel commented 8 years ago

Bump! Has anyone else had this issue?

kaxel commented 7 years ago

OK! ALERT FELLOW JAVASCRIPT GRAPH MAKERS! This product is obsolete. It is not supported and you should probably move to bootgrid. I have removed all of my columns class calls, implemented the bootstrap framework, and now use bootgrid as a very simple js call on ACTUAL HTML tables, as opposed to using this product with csv files.

I could not be happier, and you should all realize that this WAS a great product, but whose time is now done. Good luck to you all.

http://www.jquery-bootgrid.com/examples