Sort order on loaded array

QuestionsSort order on loaded array
Andreas Ek asked 11 years ago

Hi!
When I use the sort functionality on a grid loaded with an array it seems like the grid orders small and large chars differently.

Eg, One column sorts like this:
Andrew B
Cedric B
andrew A
cedric A

It should sort like:
andrew A
Andrew B
cedric A
Cedric B

Is it possible to change this behavior?

1 Answers
Abu Ghufran answered 11 years ago

Hello,

You just need to set

$grid["ignoreCase"] = true; // do case insensitive sorting
$g->set_options($grid);

Your Answer

10 + 2 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?