⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Sorting showing number 100 before number 1000



Juanma

Juanma
  • profile picture
  • Member

Posted 26 September 2019 - 10:19 AM

Good afternoon, I'm using Grocery Crud with datatables theme and I noticed that when I order by numbers the crud shows it like this:

 

  • 0
  • 1
  • 1000
  • 1001
  • 1002
  • 1004
  • 101
  • 1013
  • 1014
  • 102
  • 1020

This is not right since I need the 100~ to show before the 1000. I saw a similar problem where dates would only be sorted by days but I found the solution in these forums so I hope that someone knows the solution for this.

 

Thanks in advance and have a good day!!


zaang

zaang
  • profile picture
  • Member

Posted 04 October 2019 - 11:33 AM

Is this column set as varchar in the database ? that might be the cause