PDA

View Full Version : grid using Ext.selection.CheckboxModel



muselmanach
26 Sep 2011, 10:25 AM
Hello!

I am using an
Ext.selection.CheckboxModel for my grid like the 2nd one here:
http://dev.sencha.com/deploy/ext-4.0.0/examples/grid/grid-plugins.html

My problem:

I select some of the rows before i render the grid.
My Problem is now, if you click on a row without pressing the "ctrl" button all selected rows will be deselected and only the one you currently clicked on will be selected.

Is there any solution to this problem?

edit: i dont want to use the checkOnly attribute within the selection Model. I would like to overwrite the listener that is responsible for the click action, but it isnt the beforeItemclick and its not the beforeselect...

thx

skirtle
27 Sep 2011, 12:06 AM
Have you tried mode: 'SIMPLE'?

muselmanach
28 Sep 2011, 9:00 AM
thx, that really solved my problem.

big thx

cazyck
4 Oct 2011, 3:59 AM
Hi,
can you show me an example how to preselect a checkbox Grid?

muselmanach
4 Oct 2011, 6:07 AM
var gridPanel = Ext.getCmp('id');
var record = gridPanel.getStore().getById('valueYouWant');
gridPanel.getSelectionModel().select(record);

hope this helps ;)

still needing a solution for my problem

pls help

skirtle
4 Oct 2011, 12:28 PM
still needing a solution for my problem

What problem remains?

muselmanach
5 Oct 2011, 4:18 AM
oh, sorry wrong thread i meant this one:

http://www.sencha.com/forum/showthread.php?148807-Ext.selection.CheckboxModel-header-is-null