문제

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