Sort name and Sort order not working.

QuestionsSort name and Sort order not working.
Don Mangold asked 9 years ago

Not sure but the following is not controlling the order of my table displayed in the grid.

$grid["sortname"] = 'SPSPACE_ADDRESSSORT';
$grid["sortorder"] = "desc";

Thanks

5 Answers
Abu Ghufran answered 9 years ago

I rechecked it and it works as expected. Please make sure you pass the $grid array to set_options() function, before calling ->render() function.

Abu Ghufran answered 9 years ago

Please share the code for review.
You can use pastebin.com for sharing.

Don Mangold answered 9 years ago

Hi Abu,

I did confirm that I called the set_options() before the render(). Any other thoughts?

Thanks

Don Mangold answered 9 years ago

Went into the JQGrid_dist.php and found the SQL being executed. I am using DB2 and the order by clause was on an internal sub query and moved it to the outside query and fixed the issue. Also fixed a column sort issue I was having.

Thanks

Abu Ghufran answered 9 years ago

If you think it was a bug fix, I can review / merge it with newer version so that you don't need to do manual changes again.

Your Answer

7 + 17 =

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?