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 -
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)
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)