Hi Nancy,
In this case I would not use a templategrid, in fact I do not recommend using a templategrid at all because it is sub-optimal in several areas, including performance.
What you need to do is use a Listview. The listview has this function available by default and you could add filter options that make it almost identical to the templategrid.
Of course, the great advantage of the template grid is that you can have multiple columns in it, you can also easily add this in the list view by with predefined CSS classes from Atlas Design Systems.