Fix rows range in Grid footer

- Fix rows range when there is expanded rows.
- Fix rows range depending on first and last row visibility.