Add a dataview that surrounds the template grid with the needed search fields.
Add a button on the data view that refreshes the object to load the template grid.
Make sure the datasource microflow take the surrounding object as a parameter and define the query based on the search attributes to retrieve the matching data. Building an xpath statement being executed by a java action is probably the easiest/ fastest depending on the amount of search attributes.
In essence you’ll need to create the search functionality yourself.