View Full Version : Regarding Ext.ComponentQuery.query . How to use

24 Feb 2014, 8:31 AM
Dear experts,
I would like to understand the usage of Ext.ComponentQuery.query('#something')[0] little better.
I have defined a grid in one file named, mygrid.js. There is also an store called mystore.js.
My store has an

itemId: storeId

My question is, can I get hold of my store by doing the following.


Do I have to use requires:['myStore'], before doing that.
My understanding is that we should only need to use requires, if I want to use a component's xtype within another component.

Please advise.

Thanks a lot,

24 Feb 2014, 11:12 AM
Looks like we cant use .query to retrieve Stores. It can only be used for components like grid, model etc.
I solved it by getting the Grid using the same expression. Then I got the store through getStore().

Thanks for looking