Added the selection of the template to each grid.