Filter Inputs and Select Values

I added some filters in a grid:


They are working fine but when I return from a page the input box and select in the header are keeping their value but when I am trying to get their values through: mygrid.getFilterElement(1) the method returns null.

How can I get the values of the filter inputs and selects in the header of a grid when I returning from other page?