View Full Version : Event listener for refresh button available as default with pagination grid

3 Jan 2014, 2:44 AM

I have a pagination grid. You know pagination grid has refresh button as default at the bottom of the grid.

How do i write handler for that refresh button?. I used "beforeLoad" attribute in grid in the listener event. But it listens for pagination and also for refresh. In this case, How can i find, whether this is refresh button event or pagination event?


13 Jan 2014, 1:57 PM
The button is cached on the toolbar with the property 'refresh'. You could set an afterrender listener on the toolbar and in that set a 'click' listener on the button to set a property on the store saying that the refresh was from the toolbar. Then on your store load listener you can check to see if the property was set by the refresh click or not (and reset it to null on each load so it's ready to check again after each load).