Results 1 to 3 of 3

Thread: How to get the start and limit associated with store

  1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    43

    Default Answered: How to get the start and limit associated with store

    Hi Merry Christmas,

    I have a grid panel. In it i'm showing one of the columns which holds the row numbers. I have used the rownumberer. But when i navigate to the next page again my numbers start from one. I'm doing like this on my column now. Not to able to get hold of the start.


    { text : 'row',
    dataIndex: 'rowIndex',
    sortable : false,
    // other config you need..
    renderer : function(value, metaData, record, rowIndex, colIndex, store) {
    //how to get start
    return
    store.start + rowIndex;
    }
    }

    I know the params start and limit will be associated with store proxy. will start and limit become extra params. some how i need the start in this case. please advice

  2. currentPage should allow you to calculate the row index:

    http://docs.sencha.com/ext-js/4-1/#!...ty-currentPage

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585

    Default

    currentPage should allow you to calculate the row index:

    http://docs.sencha.com/ext-js/4-1/#!...ty-currentPage

  4. #3
    Sencha User
    Join Date
    Apr 2011
    Posts
    43

    Default

    Thanks a lot. Got it working

    renderer : function(value, metaData, record, rowIndex, colIndex, store)
    {
    return (((store.currentPage-1)*_itemsPerPage)+rowIndex+1);
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •