I have a Grid with Grouping feature. I have set the “groupField” config to the column on which I want grouping. So when the page get load , Grid shows the grouped columns.and it is working fine.
for my requirement, I have not added the column [on which I am doing grouping] to the Grid. So the Grid doesn’t show the Grouped column.
so the scenario is like.
if eg.
Grid with 5 column [Name, Email,Status,address,city]
currently displayed column= 4 [Name,Email,address,city]
Grouped column= 1 [status]
Now My Query is, out 4 [currently displayed ] column if, I changed the grouping to “city”, [remember, on page load we have grouped Grid data, since I have set “groupField=status” in store] how will I go back for the default grouping [i.e. Grouping on status column]?
Note: The column “status” is not displayed to Grid, there is no header option from which I can change the Grouping.
Hope I am able to explain well here.
You can create button which will turn on grouping by status like in Ext JS example (there is only clearing, but you can do grouping as well).
Another possibility is to create handler on
beforeloadevent in store, and check if there is any grouping turned on – if not turn on grouping bystatus. Then you can’t turn off grouping.