質問

I use the below code to apply "all" option in pager dropdown. This is only apply for bottom pager only not for top bar. Please help me to apply this for both top and bottom pager

rowList: [5, 10, 20, 50, 1000, 10000000],
pager: '#pager


$("#pager option[value=10000000]").text('All');
役に立ちましたか?

解決

Let us you have grid with id="list" for example, then the id of the toppager will be list_toppager. So to change "10000000" text in both pagers you can do the following

$("#pager .ui-pg-selbox option[value=10000000]").text("All");
$("#list_toppager .ui-pg-selbox option[value=10000000]").text("All");

or alternatively you can use one line

$("#list").closest(".ui-jqgrid")
    .find(".ui-pg-selbox option[value=10000000]")
    .text("All");

which changes text in both top and bottom pagers.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top