limit number of rows from query

Questionslimit number of rows from query
Shahid asked 3 years ago

I am using 1.5.2 version. I just need to make one change. I need to limit number or rows in result. My query will be like- select * from where model=x limit qty. this qty will come from master grid.

3 Answers
Abu Ghufran answered 3 years ago

Currently it's not doable with lib.
You can try edit core lib jqgrid_dist.php and make changes as you need.
$limit = intval($_GET['rows']);

shahid answered 3 years ago

Even if I am able to show the desired number of rows on the first page. that will work for me. I tried $opt["rowNum"] = intval($_GET["qty"]); but this does not work.

Abu Ghufran answered 3 years ago

The rows per page are set when the grid structure is generated first time.
It will not effect on data reload.

This may need some changes in core lib.

Your Answer

16 + 0 =

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 / 5. Vote count:

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

Let us improve this post!