Jump to content


Sorting showing number 100 before number 1000

sorting order datatables

  • Please log in to reply
1 reply to this topic

#1 Juanma

Juanma

    Newbie

  • Members
  • Pip
  • 5 posts

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!!



#2 zaang

zaang

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 04 October 2019 - 11:33 AM

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







Also tagged with one or more of these keywords: sorting, order, datatables

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users