Results 1 to 2 of 2

Thread: grid.store.remove(); behavior

  1. #1
    Sencha User woodville's Avatar
    Join Date
    Aug 2011
    Location
    Japan
    Posts
    27

    Default grid.store.remove(); behavior

    While using "grid.store.remove();", I encounterd strange behavior as below.

    ------------
    I'm a beginner of SA2 and Ext JS 4.
    I could not find the thread on this matter.
    I'm using SA 2.0.
    ------------

    I have several rows in the grid and I tried to delete one or some of them.
    1) At the first action, the last row(s) were deleted instead of the rows selected.
    2) After the second action, the exact row(s) are deleted and this behavior continues.

    When I checked "members" using console.log, it shows correct data.
    But in the POST, at the case of 1) the rest of rows are inside except rows selected.
    At the case of 2) the rows are correctly selected.

    Code:
    var componentM = Ext.getCmp('createGroup');                // getting id of panent component
    var grid = componentM.down('#groupMembers');               // using itemid of grid
    var members = grid.getSelectionModel().getSelection();
    
    console.log(members);                                      // just for debug
    
    grid.store.remove(members);
    grid.store.sync(members);

  2. #2
    Sencha User woodville's Avatar
    Join Date
    Aug 2011
    Location
    Japan
    Posts
    27

    Default

    The code above is for the button (for deleting rows) in the toolbar attached on the grid.

Posting Permissions

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