How to access the "last row" or "last column" in a grid/table for styling functions?

This is a related question that you might find useful: