Grid Filter Row Large Data Source


When we have a large data source and the amount of possible items in a filter dropdown is too big, loading all the items in the filter dropdowns on each grid load is not an option.
For example if "Food" dropdown has 1 million items it would be impractical to load them all.
One easy solution would be to use a textbox instead, like we've done for the Person column.

Another option is to use a dropdown with remote search, as done for the Food column, initially only a few items are loaded, and additional items are loaded when we make a search (SearchFunc is used for this). We've set o-nfload on the country dropdown so it won't load each time the grid loads, this is only necessary for editors that get their data from the grid model (Tag.frow set in the grid action).

Country, Chef and Meals also use SearchFunc like "Country" except grid filter parameters (order, selected values) are also sent to the searchFunc so the resulting items are filtered based on the previous selected filters.
So if you select a certain "Food" and a certain "Country" and after search in the "Meals" editor, the result will contain only meals that have rows with the selected "Food" and "Country" (Meals also gets filtered by previously selected meals).
On the initial load only the filter dropdowns items for the selected value(s) are received from the Grid Model.



Comments