...so the header and/or footer can scroll with the rows. Currently they are outside the scrolling region for these table types.
Header/footer should be independently configurable. See the commented code.
The conditional views (bounded by if blocks) need to be tested and analyzed to ensure they don't affect scalability.