1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    2
    Vote Rating
    0
    azhar.salati is on a distinguished road

      0  

    Default ExtJs 4 local store issue while deleting a record

    ExtJs 4 local store issue while deleting a record


    Hi,
    I am using a local store for my grid with a pagination bar. I am having a delete button for which onClick function is written, which does the delete operation(by calling a servlet) from the database. Now once this delete is performed i would like to delete the record from my grid.
    I am achieving this using following line -
    myStore.removeAt(recIdx);
    This removes the record from the grid but when the navigate using the pagination bar next or previous the record that was removed is again displayed in the grid. I think its because my store is local.
    Is there a way to overcome this condition???? (I want to keep my store as 'local' only)

    Thanks!!!

  2. #2
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,663
    Vote Rating
    110
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    does it make sense to use a local store when you are communicating with your backend anyway?

    i would try calling store.sync() after the removeAt-call.
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    2
    Vote Rating
    0
    azhar.salati is on a distinguished road

      0  

    Default


    Hi tobiu,

    Yes we are communicating with the backend but keeping in my mind some performance issues we have decided to go with the local store.
    Also i have called sync() of the store but still the issue is there. Ok I will again explain the scenario -
    Suppose I am having 50 records in a grid with page size as 10. So i will have pagination bar with 5 pages.
    Now suppose on page 1 i delete a record so now the stores totalCount goes to 49. The record also gets deleted from the grid but when i navigate to page 2 and back to page 1, I again see the record that was deleted and the store totalCount is again set to 50.
    I am unable to fix this scenario even calling myStore.sync() after the mySore.removeAt(recIdx)

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar