Hide keyboard manually, or set "focus out" manually
I'm simulating a predictive search that populates a data grid as the user types into a search field. The keyboard pops up over the bottom of the screen as this happens. I want to make the keyboard go away as soon as the user clicks on the data grid, but this doesn't happen. The keyboard only goes away when the user clicks outside of the places where the results will appear. There doesn't appear to be any way to say "When focus out on search field, hide keyboard," or even to say, "When tapping on a data grid field, focus out on search field."
What's the workaround?