-
21 Oct 2010 7:54 AM #1
Sortable Columns: Remove 'Sort Ascending,' 'Sort Descending' Options
Sortable Columns: Remove 'Sort Ascending,' 'Sort Descending' Options
Hi,
Since I am able to sort the columns by just clicking on the headers, I would like to remove the two options given in the title of this post. Would that be possible?
Sincerely,
Jay M.
-
21 Oct 2010 9:43 AM #2
I believe this is the command you need to setup on your column
Code:menuDisabled: true
-
21 Oct 2010 9:46 AM #3
FYI, you can set defaults on column models.
Code:new Ext.ColumnModel({ defaults: { sortable: true, menuDisabled: true }, columns: [...] })
Wes
-
21 Oct 2010 10:44 AM #4
-
21 Oct 2010 10:57 AM #5
Thanks everyone. The menuDisabled option works but for some columns I'd still like to retain some features, like enabling columns that were initially hidden. That being said, Condor, could you please elaborate on your post. Where can I find more information about the viewready event?
Thanks,
Jay M.
-
21 Oct 2010 2:51 PM #6
viewready on grid.
grid.getView().hmenu
has items that can .hide and .show...
GL
Wes
-
21 Oct 2010 11:49 PM #7Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
Disclaimer: Completely untested code!Code:grid.on('viewready', function(){ grid.getView().hmenu.getComponent('asc').hide(); grid.getView().hmenu.getComponent('desc').hide(); });
-
22 Oct 2010 6:17 AM #8
-
4 Mar 2013 10:32 PM #9
I have added same code , but I am getting error as "Uncaught TypeError: Cannot call method 'getComponent' of undefined "
What I suppose to do?
-
5 Mar 2013 7:47 AM #10
Similar Threads
-
Sort ascending and descending.
By oasisjoel in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 6 May 2009, 10:35 PM


Reply With Quote

