PDA

View Full Version : Out of order Grid.store.load()



Supergibbs
13 Jul 2010, 3:31 PM
In my app there is a tree of checkable nodes, when checked, it reloads a grid with the added node. If I check a bunch of nodes very fast then the updates come back out of order and the grid will be incorrect. At first I was going to send a timestamp with the request (beforeload) and pass it back but I don't see an event to stop loading the grid. Old request aren't needed, they can be canceled or completely ignored without loading. Is there a way to ensure the latest request happens last without blocking the UI for each checkbox?

Thanks

13 Jul 2010, 4:43 PM
maybe mask the tree panel when you're loading the grid store ?

Supergibbs
13 Jul 2010, 4:52 PM
Thanks. I know this is an option, but I'd prefer not to; that is what I meant by "without blocking the UI".

I am more looking for a way to manage the updates so I can cancel older ones or at least queue them so them go in order.

13 Jul 2010, 4:55 PM
the only way to do it is to somehow manage a task that checks an array (task list) to perform the requests.

To be honest, it's quite silly to do one request per click. you should consider working on a batch mechanism.