I'd like to implement custom filtering based on rows of child grid.
The attached image shows the layout of my grid.
My questions are as follows:
Q1. How to filter the 'company' rows based on the 'customers' who sold more than 100 items?
For eg: After I click 'Customers Selling > 100 Items 4 months' button, I only should show 'Company1' row with 'Customer12' row in its child grid.
Q2. If I want to clear the filter, I should be able to do so as well. (How do I do that in a button? Maybe show active button when used? I'd like your opinion on that.)
Q3. To fetch these data, the server needs to do some expensive calculations, so how can I reuse the dataSource when the customer navigates through different pages instead of doing full fetch from controller while navigating to different pages?
My code looks like this:
The data models:
The grid containing the child grid as well:
The toolbar template:
The script that loads the child grid and the handler for toolbar button:
The controller action method: