Opened 13 years ago

Closed 10 years ago

#8376 closed defect (invalid)

Grid does not automatically refresh after you delete large numbers of items that back it

Reported by: ptwobrussell Owned by: ptwobrussell
Priority: high Milestone: future
Component: DojoX Grid Version: 1.2.3
Keywords: Cc:
Blocked By: Blocking:


I spend a while struggling with an issue where I was deleting large numbers of items from the store that backs my grid and having the grid display the "..." stuff in each row. After interacting with the scrollbars a bit, the grid would eventually "filter down to" the right number of rows (in my case, only 2 of about 10,000 were remaining). But then when you click on a row, you get errors from the store. Obviously, not ideal behavior.

I find that calling grid._refresh() resolves the issue nicely, so I am wondering if perhaps we should rename _refresh to refresh w/o the underscore that implies "private" and document that sometimes this call may be needed for batch operations such as what I was doing? (That is, unless there is supposed to be some internal mechanism that would be doing this automagically).

I would offer a patch for this, but it would be trivial if this fix is accepted.

Change History (6)

comment:1 Changed 13 years ago by ptwobrussell

At phiggins' suggestion, I tried using the beginUpdate() / endUpdate() method pair and it didn't work out and resolve the issue either. (I called beginUpdate in my store's onBegin function and endUpdate in my store's onComplete function where almost all of my onItem calls were doing a deleteItem on the store)

comment:2 Changed 13 years ago by bill

This sounds like a caching bug, that grid isn't properly updating as per change notifications from the store (or alternately the store isn't properly notifying the grid). You should attach a test case. (ISTM) you shouldn't have to call refresh(), unless you are mucking with the store internals directly rather than deleting the items through the store API.

comment:3 Changed 13 years ago by Bryan Forbes

Milestone: tbd1.3

I checked a change in to trunk to fix beginUpdate() / endUpdate(). Could you please try again with trunk?

comment:4 Changed 13 years ago by Bryan Forbes

Milestone: 1.3future

comment:5 Changed 10 years ago by Bryan Forbes

Owner: changed from Bryan Forbes to ptwobrussell
Status: newpending

Please let me know if the change I introduced 3 years ago fixed your issue.

comment:6 Changed 10 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.