What's happening here is that the selectionchange event is being triggered on changing the page of data and I don't want that to occur. Ideally, only user clicking would be tracked as 'selectionchange' events, not any other component's events bubbling up and triggering the event on my selection model. Looking at the source code, the only event I could see that fires on the PagingToolbar is 'change'. I was trying to follow how that is handled by the GridPanel, TablePanel, Gridview, etc, but I'm just not seeing the path of the event.
I've managed to handle that. The key is to detect where page changes. Easiest solution is to set buffer for selection listener and check for Store. Here is my implementation of selection model:. Add select and deselect listeners on the checkboxmodel. In these functions add or remove the selected or deselected record from this local store.
On the pagingtoolbar, add a change listener to reselect previously seleted records when appear in the page. After whatever action is complete where these selections are no longer needed.
If you encounter any problems running the examples, please let me know — I already did some modifications to the original, so they are running under Codenvy. The data grid of ExtJS does not contain such a feature by default, but it could be implemented by adding a special column to the column model. Using this extension , it could be easily done like this:. Clicking on the button will clear the history bar as well as the history kept in local storage.
We create a store with different record counts and override the selection model methods we care about so we can spy on them and keep track of how many times they get called as a function of the number of records being selected.
The source for class members can be viewed by clicking on the view source link on the right-hand side of the member row.
People clicking on the click will get a copy of your workspace and can work in their own sandbox. Developing for Multiple Screens. Public classes and members may safely be extended via a subclass.
You can also toggle the collapse state of all examples using the toggle button on the top-right of the page. Getting and setter methods that correlate to a class config option will show up in the methods section as well as in the configs section of both the API doc and the member-type menus just beneath the config they work with.
You can expand what is displayed by clicking on the button on the right-hand side of the history bar and choosing the All radio option.