关于ext.grids常见问题(Frequently asked questions about grids :: Mar 29, 2008 Check the store configuration (sortInfo and sort type) or use setDefaultSort() .. php buffer start --> bbar: new Ext.PagingToolbar({ http://www.dojochina.com/?q=node/655HOME | I am creating grid using an inline store with the following config options
autoLoad:{params:{start:0, limit:20, sort: 'id', dir: 'ASC'}} ourproject.org: kune: free/libre projects management: SCM Repository:: I18N.t("Click to sort")); setRenderer(renderNT); } }; final GridEditor store , columnModel); final PagingToolbar pag = new PagingToolbar(store); pag. http://ourproject.org/plugins/scmsvn/viewcvs.php/trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/ui/I18nTranslatorPanel.java?rev=727&root=kune&sortby=date&view=markupHOME | http://colinramsay.co.uk ~ diary:: The “sort” argument tells me the column I should sort on, and “dir” gives have a PagingToolbar, a particular click handler, and other default settings. http://colinramsay.co.uk/diary/HOME |
I have attached a PagingToolbar to the grid but when I page using the Toolbar the sort and dir parameters are not included, if I sort the grid by clicking a column the parameters are then included with the PagingToolbar. How would I go about getting the PagingToolbar to use the grid's sort and dir on initial creation? Is it possible or if I have to abandon the autoLoad config, how do I go about setting an initial default sort and dir inline?
Thanks in advance for any pointers.
Remy
Sorting info should be added to the store in the 'sortInfo' config option, that way it will be managed for you automatically.
Hmmm, had looked at that before as well. Sorry for the daft post, sortInfo works a treat ;)
Nortel Unveils Vision, Strategy for Israeli High-Performance Net
Busy Friday Leads to Strong Close for Net Stocks
|