Hi!
What’s the best way, if any, to prevent data being initially loaded for a view and have it loaded only if search form is being submitted?
I’m using GridView, search model and ActiveDataProvider.
I want to avoid making a db query on load as the table I’m accessing is huge. Even if I restrict the rows that need to be pulled, it’s very likely that the user will change the restrictions anyway (via the search form) to match their needs and trigger a subsequent call to db. So the ideal scenario would be not to perform the initial query at all.
So what I would like to see when my page loads is the search form only and then when the form gets submitted I would like the GridView to display the data that matches the search criteria.
Thanks for any suggestions.