I have a grid that displays search results. Initially the empty text of the grid is set to "No results for search". This works fine on startup. When I do a search, I clear the store and add results: if there are no results, then the empty text shows up as expected.

Then I tried modifying the empty text to display "Searching ..." when the search is started, and setting the empty text back to "No results for search" when the search had finished.

When the search starts, the store is cleared and the empty text "Searching..." is displayed in the grid, as expected. But if the search returns no matches, then setting the empty text to "No results for search" has no effect.

I assume that setting the empty text is not enough: there has to be some event (clearing the store or removing an object from the store) that will get this empty text and add it to the grid. Changing the empty text when the store is already empty (which is the case here when the search returns no results) has no effect.

So ... if the store is already empty, how do I change the empty text of the grid so that it is visible?