1

I want to select similar records from grid1(account) and grid2(group) simultaneously.

Scenario : For example say that if group 1 has account A and B and group 2 has account C,D and E. A user selects account D . On the back automatically, group 2 and account C and E should get selected. If user selects group 1 and 2 then on the back all the five accounts should get selected.

Please help me resolve this.Thanks

Dev
  • 3,922
  • 3
  • 24
  • 44
  • It is hard to know why you are getting this error, and if it is related at all to the listener you post. You need to do some debugging, and understand when this error is occurring. – Amit Aviv May 09 '13 at 08:15

2 Answers2

1

How about looking at the docs? http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.selection.Model-method-select

grid.getSelectionModel().select(records)
dbrin
  • 15,525
  • 4
  • 56
  • 83
  • Using grid.getSelectionModel().select(records,true), my previous issue is solved.But on selecting all records select event is not getting fired.Thanks for your answer and the link provided. – Dev May 10 '13 at 06:19
0

I have resolved my issue using :

grid.getSelectionModel().select(recordIndex,true);

Looking into another issue that,select event was not getting fired on CHECK ALL in grid with CheckboxModel() as selectionmodel. So I replaced select event listener with : http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.grid.Panel-event-selectionchange

selectionchange : function( thisobj, selected, eOpts)

Dev
  • 3,922
  • 3
  • 24
  • 44