Reputation: 315
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.
Upvotes: 0
Views: 389
Reputation: 315
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.
Upvotes: 0
Reputation: 222007
You can use ignoreCase: true
option to make local sorting case insensitive.
More recent version of jqGrid allows full customize sorting and searching/filtering (see the wiki article as the start point). New versions allow you to specify custom compare function for comparing items in the column. It allows to implement any custom sorting behavior. You use 5 years old jqGrid version 4.4.3, which is dead since a long time. I recommend you to upgrade to free jqGrid 4.15.2.
Upvotes: 2