Added selectAllVisibleRows to selection feature

Also extended unit tests to cover this and some other functions.
Merge pull request #1495 from PaulL1/selectAllVisibleRows2

Added selectAllVisibleRows to selection feature