Can't get the current page as parameter when the next button is clicked

前端 未结 2 339
别跟我提以往
别跟我提以往 2021-01-21 07:48

I\'m trying to get the page number as a parameter when the next button is clicked.

I\'m trying to achieve it using the below code:



        
相关标签:
2条回答
  • 2021-01-21 08:21

    Try this

    onPaging: function(pgButton){ if(pgButton=="next_your_paging_tool_id"){ window.alert("next clicked! \n page: " + $('#userlist').getGridParam('page')); } },
    

    append the ID of your paging tool ID with a _ in your if condition as in the code posted

    0 讨论(0)
  • 2021-01-21 08:22

    pgButton is a String. You should write if (pgButton == "next"). See: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:pager#events

    0 讨论(0)
提交回复
热议问题