How to set Grid filters in code

This thread will show you how to put it in code. It basically sets the grid filter like the user doing it on their own.The example is using a text box.