-
20 Mar 2013 9:10 AM #1
Answered: grid column sort option greyed out
Answered: grid column sort option greyed out
I don't understand why the sort option for my grid columns is disabled (greyed out) although I use sortable : true configuration. Any help would be greatly appreciated.
My grid with store and model are attached.
-
Best Answer Posted by remiszej
After some troubleshooting I found out that my problem was buffered configuration for the store.
Once I removed that, column sorting is back.
-
20 Mar 2013 1:38 PM #2Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,186
- Vote Rating
- 194
- Answers
- 433
Perhaps I missed something?
Scott.Code:Ext.create('Ext.data.Store', { storeId : 'simpsonsStore', fields : [ { name : 'name', sortType : Ext.data.SortTypes.asUCString }, 'email', 'change' ], data : {'items' : [ { 'name' : 'Lisa', 'email' : 'lisa@simpsons.com', 'change' : 100 }, { 'name' : 'Bart', 'email' : 'bart@simpsons.com', 'change' : -20 }, { 'name' : 'Homer', 'email' : 'home@simpsons.com', 'change' : 23 }, { 'name' : 'Marge', 'email' : 'marge@simpsons.com', 'change' : -11 } ]}, sorters : { property:'name', direction:'ASC' }, // default sort proxy : { type : 'memory', reader : { type : 'json', root : 'items' } } }); Ext.create('Ext.grid.Panel', { title : 'Simpsons', store : Ext.data.StoreManager.lookup('simpsonsStore'), columns : [ { header : 'Name', dataIndex : 'name', sortable: true }, { header : 'Email', dataIndex : 'email', flex : 1, sortable: true }, { header : 'Change', dataIndex : 'change', sortable: false } // disable for grins ], height : 200, width : 400, renderTo : Ext.getBody() });
-
20 Mar 2013 2:26 PM #3
grid column sort option greyed out
grid column sort option greyed out
Scott, thank you for your reply.
Your code is pretty much what I have, and the code that I attached always worked for me. The only twist now is
that in the controller I add filter to this grid's store. However, on startup filter is not applied and sort options in the column header are still grayed out (disabled).
-
22 Mar 2013 4:58 AM #4
column sort option greyed out
column sort option greyed out
After some troubleshooting I found out that my problem was buffered configuration for the store.
Once I removed that, column sorting is back.
-
22 Mar 2013 5:01 AM #5Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,186
- Vote Rating
- 194
- Answers
- 433
Thanks for the update.
Scott.


Reply With Quote