-
18 Mar 2013 11:03 AM #1
Row numberer not updating when changing page via paging toolbar
Row numberer not updating when changing page via paging toolbar
Ext version tested:- Ext 4.2.0
- Chrome 27.0.1438.7 dev
- When using a grid with a rownumberer column and the paging toolbar in 4.2.0, the row numbers aren't being updated when changing pages. For example, with 50 pages displayed, the row numberer shows 1-50. If you switch to page 2, instead of seeing 51-100 you see 1-50.
- Add a row numberer to a grid with a paging toolbar then change to another page
- I expect the row numberer to display 51-100
- The row numberer displays 1-50
- Add to the columns array inCode:
{xtype:'rownumberer'}then open the example and click the "next page" button on the paging toolbar.Code:examples/grid/paging.js
Possible fix:
Operating System:Code:Ext.override(Ext.grid.RowNumberer, { renderer: function(value, metaData, record, rowIdx, colIdx, store) { var rowspan = this.rowspan; if (rowspan) { metaData.tdAttr = 'rowspan="' + rowspan + '"'; } metaData.tdCls = Ext.baseCSSPrefix + 'grid-cell-special'; return store.indexOfTotal(record) + 1; } });- OS X 10.8.3
Last edited by jaredhobbs; 18 Mar 2013 at 11:13 AM. Reason: Added fix
-
18 Mar 2013 12:43 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
Thanks for the report! I have opened a bug in our bug tracker.
-
17 Apr 2013 8:43 PM #3
Hi @jaredhobbs,
Thank you for a possible fix. Though it breaks if use a grouping feature.
A possible fix of your fix
is replacing:
withCode:return store.indexOfTotal(record) + 1;
Code:return store.indexOfTotal ? (store.indexOfTotal(record) + 1) : (rowIdx + 1);
-
18 Apr 2013 5:38 AM #4
Thanks for your fix of my fix. I haven't used the grouping feature with a paging toolbar before so didn't catch that case.
You found a bug! We've classified it as
EXTJSIV-9183
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote