View Full Version : how to reload a store and avoid loop

21 Jun 2011, 4:40 PM
Dear all,

I got a GridPanel with a RowSelectionmodel. When I select a row, the data related to this row is displayed on a Form, so the user can change its values. So far no problem with this, but I also want the Grid store to be reloaded, so the Grid will refresh the rows in case another user of the application has updated any other row.

The problem is that everytime I select a row I get in a nasty 'reloading' loop, that slows down everything and it does not even allow me to change and update the values in the form

rowselect: function(sm, rowIdx, record) {
// Load row data in the form

// I want to refresh this same grid

Is there any way to make this work? Is there another event related to GridPanel where I can put the store.reload to avoid this loop?


21 Jun 2011, 6:36 PM

It's me again. I just found a solution to this. Instead of putting the 'store.reload' within the 'rowslect' event, I've just put it under the 'rowdeselect' event, and now it's working as I wanted.

rowdeselect: function() {