PDA

View Full Version : CheckboxSelectionModel with cellselect listener



dailey1000
1 Sep 2011, 11:23 AM
Trying to have a checkboxSelectionModel with a cellselect listener or a rowselect and be able to determine which column the user selected. I want different actions for each column but I want the little checkbox thingy.
Any suggestions? Thanks, Dani

skirtle
3 Sep 2011, 7:52 AM
Selection can be performed using either a mouse click or key press. For row models, including checkbox selection, it only makes sense to talk about selected cells for a click, not a key press. This is why those selection models cannot give you this information themselves. You should consider how key-based selection impacts upon your requirements.

I should emphasize that CheckboxModel is a selection model. You should think of it as little more than a glorified RowModel. If what you want is a just a checkbox, not a selection model, then there are other ways to get that.

If you still want to know which cell is clicked you can find the relevant information in this thread:

http://www.sencha.com/forum/showthread.php?144666

I also suggest you take a look at:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.column.Action

dailey1000
5 Sep 2011, 5:10 AM
Thanks for you help - greatly appreciated.