View Full Version : how to know when you loaded the last store?

21 Jan 2014, 12:55 AM
I have read several store and load them all in one tree panel

for... {

how I can know when it has loaded the last store?

greetings and thanks .... :-/

21 Jan 2014, 2:35 AM
Hello Coloradocanyon,
What do you mean by when does the last store loaded? Is it the point of time when the store has loaded? Aren't you using a treestore?

21 Jan 2014, 3:02 AM
the problem comes when loading a multi treepanel store, disorderly charge and not sorted. :((
I thought when the last store, sort run, not if I'm right.

greetings and thanks .... :-/

21 Jan 2014, 7:58 AM
Could you not do something like :

var totalStoresExpected=3;
var loaded=0;

var callBackCounter=function() {
if (loaded==totalStoresExpected) {
// all loaded - do what you need..

store1.load({callback: callBackCounter});
store2.load({callback: callBackCounter});
store3.load({callback: callBackCounter});

(all untested - but you get the idea)