Author Topic: How to know which item selected in event refresh?  (Read 4910 times)

nghiemhd

  • Newbie
  • *
  • Posts: 16
    • View Profile
How to know which item selected in event refresh?
« on: October 04, 2013, 03:25:47 pm »
Hi all,

When the user clicks button refresh in the grid, I want to reload data and reset the grid to page 1 and rPP = 10 (current now I have rPPOptions: [10, 20, 50]). But when I click button Previous Page or First Page or select Records per Page, it also triggers refresh event.
So how to know which item triggers refresh event?

$("#ClaimsGrid").on("pqgridrefresh", function (event, ui) {
           
});

I tried to debug and found that $(event.currentTarget) always return the <div> of pqgrid.




paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to know which item selected in event refresh?
« Reply #1 on: October 07, 2013, 12:10:53 am »

nghiemhd

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: How to know which item selected in event refresh?
« Reply #2 on: October 08, 2013, 08:59:41 am »
Thank you very much.
Now I can handle the button refresh with $( ".selector" ).on( "pqpagerrefresh", function( event, ui ) {} );