PDA

View Full Version : 3.0 right click clear multiple selection in gridpanel ?



gaetan
21 Jul 2009, 6:53 AM
in a gridpanel with


selModel: new Ext.grid.RowSelectionModel({singleSelect:false})

with an handler attached on the "rowcontextmenu"
as soon as I right click on a row, the current selection is cleared and the "right clicked" row is selected.
This was not the way it was working in 2.1.1.

How can I select multi rows in a grid and keep the selection while showing a context menu ?

Thanks

sabilfikri
10 Feb 2011, 8:13 PM
Just migrated from v2.2.1 to v.3.3.1.

I'm having the same issue as well. In 2.2.1 it used to allow context menu on multiple selections. therefore performing same action on the selected nodes. in 3.3.1, the context menu clears everything and selects the row the right click is performed. please help.

minchen
26 Mar 2012, 9:44 AM
I am having the same issue when I upgraded from ExtJS 2 to ExtJS 3 yesterday. Does anybody find a workaround for this issue? Thanks for help.

minchen
26 Mar 2012, 10:31 AM
I found a workaround for my problem. I added the following line before my selectRow call in context menu click, that is:

if ( !grid.getSelectionModel().isSelected(index) )
{
grid.getSelectionModel().selectRow(index );
}

It works for me now.