I have 2 stores and 1 gridpanel. One store is assigned to the grid, the other is loaded with records at the beginning of my application.
Now, my problem is that when I use a render function for a column in my gridpanel, I would like to access the records of the otrher store. However, the other store is not always ready and not always full of records at the rendering moment.
¿Cuáles son las posibles soluciones a este problema?
Thank you very much in advance, David
preguntado el 03 de mayo de 12 a las 12:05
Load this second store before rendering the grid. What's seems to be a problem?
Update: you need to make sure that store2 is loaded before store1. You can do this like this:
- Don't bind store1 to your grid first in the view definition. Assign all columns and other stuff, but leave store being
- In the controller on
afterrenderevent you assign handler to the store2
loadevent in which you call
I understand one store is dependent of the other? if so load the second store on the selection of an item from the first. Or, you can just create a method to look in the data that you use to fill the store and find the thing you need.