PDA

View Full Version : [CLOSED] Remove DisableSelection on client side



blueworld
Feb 28, 2014, 7:15 AM
Hi,

I have a grid with a checkbox selection model.
In some cases the selection should be readonly.
If I disable the whole grid, I am not able to scroll.
So I have set DisableSelction=true on that grid.

I did not find any way to unlock the selection on client side, any help?

Daniil
Mar 01, 2014, 7:51 AM
Hi @blueworld,

It is what the DisableSelection do internally:

if (me.disableSelection) {
selModel.locked = true;
}
http://docs.sencha.com/extjs/4.2.1/source/Table2.html#Ext-panel-Table-cfg-disableSelection

So, to unlock

grid.getSelectionModel().locked = false;
and to lock again

grid.getSelectionModel().locked = true;

I think it should work.