Results 1 to 3 of 3

Thread: [SOLVED] How to re-number Grid's row numbering on deletion, using RowNumberer

  1. #1

    Default [SOLVED] How to re-number Grid's row numbering on deletion, using RowNumberer

    Hello,

    I have an Editable Grid with column-types: RowNumberer, CheckColumn (CheckBoxSelectionModel) and other normal data columns. In my grid, I have a delete button, which deletes the selected (via Checkbox) records.

    For deletion, I'm deleting the record from the Store object. The code looks like:

    Code:
    grid.getStore().remove(selected[i])
    The issue is: whenever I deletes a record, the row numbering is not re-numbered automatically. That means, suppose I have 5 records, which on loading has row numbers as 1,2,3,4,5 respectively. If I delete 2nd and 4th record, then the row numbering will be : 1,3,5; instead of 1,2,3.

    How can I re-number automatically? Is that can be done programatically or will be handled automatically?

    Any help will be appreciated.
    Thanks.

  2. #2
    Sencha Developer
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,516

    Default

    I'm pretty sure you need to refresh the GridView
    - http://dev.sencha.com/deploy/ext-3.3....grid.GridView

    The refresh() method should do the trick.

  3. #3

    Default

    That was yummy!

    Code:
    grid.getView.refresh();
    I thought that'll will be handled internally.
    Thanks

Posting Permissions

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