My question is whether there is a form of master control and detail with the Store.
The implementation I want to do is have one grid with orders and another with the order items. When you select an order, I would like the detail grid to show the items for that order.
There is no automatic way no, I would use the approach suggested by Alex above, populating the order items store based on which row gets selected in the orders grid.
You could possibly also have the order items in an array on the order, and then use that local data to populate the order items store instead of having to make an ajax request for them. Something like this (pseudo code, not really working as is):
const orders = [
{
id : 1,
title : 'Small order',
items : [
{ id : 1, title : 'Item 1' },
{ id : 2, title : 'Item 2' }
]
},
...
];
orderGrid.store.data = orders;
orderGrid.on({
selectionChange() {
itemsGrid.store.data = selected.items;
}
});
That would probably work well for a read-only order items view, but would require some work to get it working for an editable one. In the end I think it would be more complicated to implement than what Alex suggests.