PDA

View Full Version : CheckBoxSelectionModel - Checkbox weird behavior



samshu
2 Dec 2010, 10:51 PM
When I select a checkbox and then press the down arrow key the selection moves to the next row and the already selected rows get unselected. I tried overriding all the key events and tried to stopEvent()/stopPropagating()/preventDefault() it, but it did not work. Can anyone please explain if this is expected behavior or is this indeed a bug ?
I've attached a video here - http://jump.fm/JPDVV. This might explain better.(This video has been taken right from the examples page -
http://dev.sencha.com/deploy/dev/examples/grid/grid-plugins.html)

Condor
3 Dec 2010, 3:05 AM
No, it's not a bug. A CheckboxSelectionModel is just a RowSelectionModel that shows a checkbox for every selected row.

If you don't want your checkboxes to be selection based then you should use a CheckColumn.

samshu
3 Dec 2010, 4:09 AM
No, it's not a bug. A CheckboxSelectionModel is just a RowSelectionModel that shows a checkbox for every selected row.

If you don't want your checkboxes to be selection based then you should use a CheckColumn.
Thanks for the reply Condor. Now that i've already used CheckBoxSelectionModel, is there a way to prevent selection of rows by just using the arrow keys ?
PS: I would actually want to persist with the CheckBoxSelectionModel since I still want its other features especially row highlighting.

Condor
3 Dec 2010, 4:26 AM
That would require a rather big rewrite of CheckboxSelectionModel. It's not impossible, but it would be a lot of work.