Hybrid View
-
27 Sep 2008 9:09 AM #1
Help - How to remove sort field when reload grid
Help - How to remove sort field when reload grid
When I click on the column header to sort column and click reload button on paging toolbar, the column still keep sort. How can I reset it. Thanks
Sorry for my bad English.
-
28 Sep 2008 11:17 PM #2
Add this line
stateful: false,
in new Ext.grid.GridPanel
-
28 Sep 2008 11:30 PM #3
Thanks v.sushma so much.
But the column still keep sort. I want reset it when grid is reloadedSorry for my bad English.
-
28 Sep 2008 11:45 PM #4
Code:delete myStore.sortInfo;
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
28 Sep 2008 11:47 PM #5Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
Example:
Code:bbar: new Ext.grid.PagingToolbar({ onClick: function(which) { if (which == 'refresh') { delete this.store.sortInfo; } Ext.grid.PagingToolbar.prototype.onClick.apply(this, arguments); } ... })
-
29 Sep 2008 12:15 AM #6
Thanks Animal and Condor. The sortInfo now deleted successful. How can I reset the GUI ? I want to remove sort arrow on column header, too.
Sorry for my bad English.
-
29 Sep 2008 12:22 AM #7
Yes, there's a bif of a gap here. You'll have to do it yourself:
Code:myGrid.view.getHeaderCell(columnIndex).removeClass(["sort-asc", "sort-desc"]);
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642


Reply With Quote