Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-9183 in 4.2.1.883.
  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    2
    Vote Rating
    1
    jaredhobbs is on a distinguished road

      1  

    Default 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
    Browser versions tested against:
    • Chrome 27.0.1438.7 dev
    Description:
    • 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.
    Steps to reproduce the problem:
    • Add a row numberer to a grid with a paging toolbar then change to another page
    The result that was expected:
    • I expect the row numberer to display 51-100
    The result that occurs instead:
    • The row numberer displays 1-50
    Test Case:
    • Add
      Code:
      {xtype:'rownumberer'}
      to the columns array in
      Code:
      examples/grid/paging.js
      then open the example and click the "next page" button on the paging toolbar.

    Possible fix:
    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;
        }
    });
    Operating System:
    • OS X 10.8.3
    Last edited by jaredhobbs; 18 Mar 2013 at 11:13 AM. Reason: Added fix

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,824
    Vote Rating
    836
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    974
    Vote Rating
    110
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default


    Hi @jaredhobbs,

    Thank you for a possible fix. Though it breaks if use a grouping feature.

    A possible fix of your fix is replacing:
    Code:
    return store.indexOfTotal(record) + 1;
    with
    Code:
    return store.indexOfTotal ? (store.indexOfTotal(record) + 1) : (rowIdx + 1);
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

  4. #4
    Sencha User
    Join Date
    May 2012
    Posts
    2
    Vote Rating
    1
    jaredhobbs is on a distinguished road

      0  

    Default


    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.

Thread Participants: 2

Tags for this Thread