Number of rows are frozen at the bottom of grid depending upon the number of rows in summaryData option.
In this example summaryData option is calculated in custom function that returns 2 rows.

Summary is refreshed whenever: