Hello @opendat2000!
Isn't this you are telling me remote paging? Or do you want to load some pages up front and handle the paging manually? This kind of hybrid paging is not supported, and would be quite a challenge to make it from scratch, I believe.
But well, the text in the pager text field shows the current page, so all you have to do is grab the page data's current page.
For instance, if I open this example:
https://examples4.ext.net/Examples/G.../DirectMethod/
I can get the paging toolbar via:
var pt = Ext.getCmp('pagingtoolbar-1023')
Then I can get the current page with
pt.getPageData().currentPage
.
So then, want to bind a custom event for the 'previous' button there?
1. Get the button from the paging toolbar. It is the second button, so:
var prevBtn = pt.items.items[1]
2. Bind it a custom action/code on click:
prevBtn.on('click', function(item, e) { console.log('click!'); })
This is client-side code. I hope these directions help you get started with your desired approach. The event binding above aggregates another event to the button, not overriding the default behavior of moving to the previous page.
Better than this, probably will be only possible studying the component's source code (refer to the documentation for toolbar linked above) and making an extension for it. It may sound cumbersome but the challenge will be in the "business logic" behind what you want to do, not really just extending the button, which works in a very similar way of using base classes on an user class in OOP.
Hope this helps!