View Full Version : Ext.grid.CheckboxSelectionModel and the selectionchange event

15 Mar 2011, 12:53 PM
Hello everyone,

I couldn't find anything inside the forum that adresses my problem.
Things are looking like this:
- i have a grid bound to an Ext.data.JsonStore
- the grid selection model uses the checkbox implementation
- the selectionchange event handles stuff (it reloads another store based on this grid selection)
- singleSelect is false
- the checkbox column is generated like in the sample (the grid plugins one)

The problem:
- upon selecting the header checkbox for the checkbox column the selectionchange event gets triggered for each row this way making my other store reload pageSize times(bbar config)
- if i mess up with the selectionchange event for this case, it gets ugly when doing simple selections by using row rendered checkboxes

I have attached a possible solution to this problem.
Please be so kind and consult it and maybe you could come up with a better solution. I personally like to keep Ext clean even when it comes to overrides, but i wasn't able to find a better way.