-
16 Jan 2011 9:36 AM #1
Disable toggling groups in a GroupingView
Disable toggling groups in a GroupingView
I am using a GroupingView in a grid, is there a way to prevent the user from toggling any or all of the groups? At certain times I don't want the user to be able to toggle any of the groups.
The reason for this is because I am using the RowEditor plugin, and when the user is in edit mode and they choose to collapse the group which belongs to the row they are editing the RowEditor is still visible, but it is on top of a different row.
Ideally I would like to prevent the user from toggling any groups in that case, or if there is an event that I can listen to, I could also cancel the current row that is being edited so there isn't a row editor just floating around.
Any suggestions??
-
16 Jan 2011 9:46 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
There is no config option for this, but you could disable the toggleGroup method, e.g.
Code:grid.getView().toggleGroup = Ext.emptyFn; ... grid.getView().toggleGroup = Ext.grid.GroupingView.prototype.toggleGroup;
-
16 Jan 2011 10:13 AM #3
It worked perfectly. Thank you very much.
I added listeners to the beforeedit and afteredit events for the RowEditor to disable and enable the toggle of groups.
Code:var beforeEdit = function(rowEditor) { rowEditor.grid.getView().toggleGroup = Ext.emptyFn; }; var afterEdit = function(rowEditor) { rowEditor.grid.getView().toggleGroup = Ext.grid.GroupingView.prototype.toggleGroup; };
-
25 Aug 2011 12:55 PM #4
This doesn't work in ExtJS 4.
Is there anyway to disable the toggling in Ext JS 4?
Similar Threads
-
Can you Sort Groups in a Grid with a GroupingView
By brookd in forum Ext 3.x: Help & DiscussionReplies: 4Last Post: 11 Oct 2011, 11:22 AM -
how to expand groups in GroupingView
By llsand in forum Ext GWT: DiscussionReplies: 0Last Post: 2 Oct 2009, 4:12 AM -
Auto collapse groups in GroupingView
By emerout in forum Ext GWT: Help & Discussion (1.x)Replies: 0Last Post: 10 Jun 2009, 7:10 AM -
Gridpanel and GroupingView with empty groups
By elvelind in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 9 Jun 2009, 4:42 AM -
Collapse just some (not all) groups inside a GroupingView
By Joschy in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 11 Jan 2009, 11:42 AM


Reply With Quote