View Full Version : How to get listener event for refresh button available in pagination grid

11 Dec 2013, 1:35 AM

I have a pagination grid. I have some text field and date field in the tool bar of the grid. I want to reset those fields when i click refresh button available in pagination tool bar. i used listeners with beforeLoad event. But thats fired even for pagination which means when click previous, next button my function called. I want only when i click refresh button, i have to reset the fields. How?


12 Dec 2013, 1:42 AM
You can get the fields by id and manually set the values of them.
Even better define your fields outside of the grid and use them directly. Like:

var field1 = new Ext.form.TextField({});
var field2 = new Ext.form.TextField({});

var form = new Ext.form.FormPanel({
tbar: [field1, field2, {text: 'Refresh', hadler: function() {
}, scope: this}],

18 Dec 2013, 8:49 PM
I think, i did not convey correctly my problem. Any how thanks for the reply.

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

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