Manjunath
Manjunath

Reputation: 107

JqGrid - How to load rowList values dynamically from Spring 3.0

How to add rowList tom jqGrid dynamically from the spring 3 based on the total number of rows. Ex: If total rows are 300 and per page if we are showing only 20. So the List shall be displayed as 20,40,60, ..... 300 from the Spring controller and has to bind it to jqGrid rowList attribute.

Please if any idea share us. Thanks in Advance

Upvotes: 1

Views: 1980

Answers (2)

Oleg
Oleg

Reputation: 222007

In general I agree with david, but to be exactly the column "Can be changed?" of the documentation says only that one can't use setGridParam method to change select values specified by rowList option.

To change the dropdown one have to modify the innerHTML of the <select> manually. For example the code

$("#pager .ui-pg-selbox").append('<option role="option" value="5">5</option>' +
    '<option role="option" value="1000">All</option>');

I used in the demo to demonstrate this. After clicking of the button "Change rowList from [10] to [10, 5, 1000]" one get

enter image description here

Upvotes: 1

Dave L.
Dave L.

Reputation: 9801

If you look at the documentation for rowList you will see in the last column of the table it says "No". The header for that column is "Can be changed?". rowList cannot be dynamically changed according to the documentation.

Upvotes: 0

Related Questions