Use same filter after grid reloads

Using the data connector, I am retrieving users from a SQL db table. My fields include firstname, lastname, and a few “status” columns where the values are either 1 or 0 (not important). After the grid loads, I filter users by lastname and then I change a cell value on one record and save the data which prompts a re-load of the grid. When the grid reloads, I want the same filter that was just used on the grid to be re-applied to the grid, but I can’t seem to get anything to work.

I tried attaching the event “onCollectValues” to the grid to capture the filter-value of the column being filtered and I tried to save that value to a hidden field. When the grid re-loads, I tried grabbing the value from the hidden field to include it in a “filterBy” function on the mygrid.load(“abc”, function(){ mygrid.filterBy(1, hiddenFieldValue)}). I obviously don’t know what I’m doing. Looking at the documentation, it appears there is more than one way to do this and I think that’s why I’m confused. Then again, I could be confused because my brain is the size of a pea. LOL! Does anyone have an example I can look at?

Could you please, clarify your filtering logic with the snippet of your code.