0
votes

I am using ExtJs 4.1. My application is having two grid. Both the grid have grouping feature (I am using two unique Grouping feature). Both the grids are using single store. Each grid is having two button used to enable and disable the grouping feature. All this is working fine.

Problem: When I disable grouping feature in one grid and open second grid, the grouping feature in second grid also gets disabled even though the grids & grouping features are different. I am not sure what is the reason for this behavior.

Please use this fiddle to reproduce the issue and see the code.

Use fiddle to see the code

Thanks !!!1

1

1 Answers

4
votes

This would work... http://jsfiddle.net/WRTM3/1/

Ext.define('myKindOfStore');
var store1 = Ext.create('myKindOfStore');
var store2 = Ext.create('myKindOfStore');

It seems that the grouping feature is actually executed on the store behind the grid. Since you use the same store in both grids each grouping plugin act like two different light switches controling the same bulb...

If you want to seperate grids behaviour, just define a new store and create two seperate store instances for each grid (see my jsfiddle fork)

This way all operations on grid1=store1 have no effects on grid2=store2 including filtering, sorting, etc.

Hope this is what you wanted :-)