Search code examples
sortingjqgriduppercaselowercase

How JQGrid sorts upper/lower case letters?


We use jqgrid to display data in a tabular view. When a column has upper and lower letters, the client side sorting shows the lower and upper letters in random order. Some lower case letters are showing first than the upper case letters, others show the upper case letters first. Please see the FirstName Column in the picture. Does anyone have experienced this same behavior and is there an explanation for this? Or what we have done wrong? We use JQGrid version 4.4.3. enter image description here


Solution

  • Just to give a conclusion on this post. I changed ignoreCase's value form true to false. When this flag is false, the grid sorts the values based on their Unicode. The sorted result is consistent each time when user clicks to sort. However, the sorting of the foreign characters (such as characters with accents) do not match the popular sorting behavior. Achieving a consistent sorting result is good enough for the coming release if our product. We will look into upgrading the jqGrid to newer version in the future. Thanks @Oleg for your help.