How to set or remove focus in a grid?

How to set or remove focus in a grid?