I created a fiddle to illustrate what I try to achieve.
https://fiddle.sencha.com/#fiddle/1i8e
On fiddle, there are two grids and a form.
When selecting a row of the first grid, the second grid is filtered (on the server side, this code was not implemented in fiddle).
Something like:
storeGrid2.load({
params: {
'item': id_item
}
});
When I press the button in form e get values from second grid store (previously filtered).
This works well.
However, I do not need the second grid as a component in my app.
Is there any way to get the second grid store values (without the grid as component), after being filtered?
Summary: I want when I select the first row of the grid 1, filters the grid2 store (without the grid as component), get this store values (here his my issue) and add the fields to form.
EDITED:
I know that my case is not easy to expose.
Suppose, for example, an app for a restaurant.
The first grid displays the days of the week. The second grid displays the available food ingredients that day. And the form displays the menu.
When the user selects the first grid row with value Monday, the second grid displays potatoes, apples and chicken. The form displays the menu according to these foods ingredients: potato soup, apple pie and fried chicken.
If it is for a restaurant customer, when he select Monday (on first grid) just menu appears, not second grid (customer do not need to know which foods ingredients are available that day, just the menu).
This can be done by hiding the grid.
However, what I was trying to achieve was whether it is possible to directly obtain the data store without a (second) grid component.
Everything happened in the ViewModel/Store layer without existing a view layer (second grid).
When I use store.load() without instantiating a component grid I get the following error: Uncaught TypeError: Cannot read property 'load' of undefined
Ext.getStore()
? – Alexander