1. #1
    Sencha User talha06's Avatar
    Join Date
    Jul 2009
    Location
    Turkey
    Posts
    305
    Vote Rating
    0
    Answers
    8
    talha06 is on a distinguished road

      0  

    Default Answered: RowNumberer issue wtih using paging

    Answered: RowNumberer issue wtih using paging


    Hello everyone,

    RowNumberer always starts with 1 while using paging. I was using PagingRowNumberer extension for ExtJS 2.x & 3.x. I've looked the documentation but I haven't seen any property for this. I want to learn if I didn't become aware of a config for this or what I need to do.

    Thanks in advance,
    With regards.
    "People will never forget how you made them feel."
    linkedin.com/in/talhakabakus

  2. Hi,
    For Ext4.X, you may use {xtype: 'rownumberer'}

    sample is:-
    Code:
    FOR Ext 4.X 
    
      columns: [    
          {xtype: 'rownumberer'},
          {text: "Company", flex: 1, sortable: true, dataIndex: 'company'},
          {text: "Price", width: 120, sortable: true}
        ]
    For ext 3.X, you may use Ext.grid.RowNumberer()....

    Code:
    For Ext 3.X
    
    
     var colModel = new Ext.grid.ColumnModel([   
            new Ext.grid.RowNumberer(),
           {header: "Name", width: 80, sortable: true},
           {header: "Code", width: 50, sortable: true}
      ]);

  3. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    Answers
    124
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi,
    For Ext4.X, you may use {xtype: 'rownumberer'}

    sample is:-
    Code:
    FOR Ext 4.X 
    
      columns: [    
          {xtype: 'rownumberer'},
          {text: "Company", flex: 1, sortable: true, dataIndex: 'company'},
          {text: "Price", width: 120, sortable: true}
        ]
    For ext 3.X, you may use Ext.grid.RowNumberer()....

    Code:
    For Ext 3.X
    
    
     var colModel = new Ext.grid.ColumnModel([   
            new Ext.grid.RowNumberer(),
           {header: "Name", width: 80, sortable: true},
           {header: "Code", width: 50, sortable: true}
      ]);
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  4. #3
    Sencha User talha06's Avatar
    Join Date
    Jul 2009
    Location
    Turkey
    Posts
    305
    Vote Rating
    0
    Answers
    8
    talha06 is on a distinguished road

      0  

    Default


    Quote Originally Posted by sword-it View Post
    Hi,
    For Ext4.X, you may use {xtype: 'rownumberer'}

    sample is:-
    Code:
    FOR Ext 4.X 
    
    columns: [    {xtype: 'rownumberer'},    {text: "Company", flex: 1, sortable: true, dataIndex: 'company'},    {text: "Price", width: 120, sortable: true}    ]
    For ext 3.X, you may use Ext.grid.RowNumberer()....

    Code:
    For Ext 3.X
    
    
     var colModel = new Ext.grid.ColumnModel([    new Ext.grid.RowNumberer(),    {header: "Name", width: 80, sortable: true},    {header: "Code", width: 50, sortable: true},    {header: "Description", width: 200, sortable: true} ]);
    Yeah I've been using it which is default for grids. I think if the library itself doesn't have a class for this; I should write an extension for this. Anyway thanks for your interest my mate.
    "People will never forget how you made them feel."
    linkedin.com/in/talhakabakus

  5. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    8
    Vote Rating
    1
    paultorben is on a distinguished road

      0  

    Default Isn't the question why it always starts with one?

    Isn't the question why it always starts with one?


    Isn't the question why RowNumberer always starts with '1'? I have the 'pagingtoolbar' enabled - pages have 50 items - I would like for the second page to start RowNumberer with '51'. Just not sure how to ... any ideas? Thanks in advance ...