View Full Version : Grid with checkBoxSelModel wrong process "Selecet/deselect All"(header column click)

7 Mar 2012, 11:07 PM
I use EXTJs3.4.
I have the grid to show user's list.
The Grid uses CheckBoxSelModel to have check-boxes at first column. I need process each select/unselect row to control another panel on the right from the grid to show user detail data(one selection) or nothing(mult sel)
I use selectionchange (http://docs.sencha.com/ext-js/3-4/#!/api/Ext.grid.RowSelectionModel-event-selectionchange) event.
"select/unselect all" (click at first column at header place ) cases to trouble. In this case this event selectionchange (http://docs.sencha.com/ext-js/3-4/#!/api/Ext.grid.RowSelectionModel-event-selectionchange) is fired for each row.
That is wrong behavior because that is ONE action "select all", and only one event should be fired at the end of the action.
How can I solve the problem.? I need catch moment than all selection or unselection will be DONE.

8 Mar 2012, 2:07 PM
This is correct behavior, it is going through each row and selecting it. You can use buffer event option to have all the calls within a certain ms time frame to act as one.

8 Mar 2012, 10:53 PM
Can you give me more details, possible some code
How can I "onSelect/Deselect All" have only one event on inside current event for each row catch the last one. And how can I find that mode(select all)

2. If there are several pages inside the grid, How select all will process them? Grid show the first page, Does only that items will be selected or all items on all pages will be selected?

9 Mar 2012, 4:56 AM
Selecting will only work with the current data set, Ext JS won't know about any other data that is on the server. As I said, you can use the buffer event option.