View Full Version : Checkbox and cellModel

29 Aug 2011, 10:55 AM
I'm making something similar to a forum. I need the first column to be a checkbox column to mass delete and such. I also was asked to make it where if I single click on any record, it goes to the responses page.

Both seem to need to be done with a selection type. Is it possible for me to figure out which individual cell I clicked on using a checkbox model, or make checkboxes using a cell model?

Or do you have an idea that would look and feel very similar to this? For example, I thought of making the title a hyperlink, which would catch the single click and also allow me to use a checkbox model. However, I don't want to change the link, I just want to change an active card on the page.

Thanks for the help

30 Aug 2011, 6:43 AM
There are cellclick and beforecellclick events that may help to figure out which cell is clicked:


There's no reason why a link has to change page. Attach a click listener (via Ext.Element) and call stopEvent() in the handler.

Adding checkboxes without them being the selection model is also possible, though in the UI you describe it does sound like the checkboxes are being used for what users would view as a selection. If you did want to go down the other route you could fake the checkboxes using images, backed by a boolean field in the store and a click handler to toggle.