PDA

View Full Version : Store filter/snapshot reload bug


steven
04-18-2007, 09:09 AM
I have been having problems with reload on Ext.data.Store if there is a filter applied.

I have a link on my page which causes the server to update and/or add new rows to my table on the server. I then call ds.reload() to attempt to refresh the grid except the new rows don't appear. If I add
delete this.snapshot;
in the reload it works.

(I also tried calling ds.clearFilter() before reload but it causes the grid to redraw multiple times)

tryanDLS
04-18-2007, 02:03 PM
Are you paging? When you call reload, did you look at what parms posted to the server? Did you look at the data coming back - are the new rows in the response?

jack.slocum
04-18-2007, 07:22 PM
If you apply a filter, you need to clear it before loading new data.

steven
04-18-2007, 07:44 PM
Hi Jack. I was calling clearFilter but it seems I must have had another bug somewhere as that wasn't working for me. Sorry!

Once difference however is that calling clearFilter redraws the grid. So when reloading with a filter enabled the grid first redisplays all the rows and then gets reloaded. Calling delete this.snapshot doesn't have the multiple redraws.
So is there a way of disabling grid updates so the grid only redraws once?

jack.slocum
04-18-2007, 10:52 PM
I have added a suppressEvent argument to clearFilter for this purpose. It is in SVN.

In the meantime, deleting the snapshot should work fine.