
Originally Posted by
tryanDLS
Try calling applyEmptyText() after you set your new emptyText string.
Thanks for the info.
The applyEmptyText() method is private in GridView but is called by GridView.refresh() so I did the following:
Code:
public void notifySearchStart() {
grid.getView().setEmptyText("Searching...");
grid.getStore().removeAll();
}
public void notifySearchFinish() {
grid.getView().setEmptyText("No results for search");
// If the store is empty then refresh the grid to show the new empty text.
if (grid.getStore().getCount() == 0) {
grid.refresh(false);
}
}
It works, but seems a bit inelegant.