I wanted to show a message in my grid when it was empty, e.g. "No nifty thingies defined" or something. I figured the grid had to have this feature, but I didn't see it in the docs, so I set about trying to figure out what element the body of the grid was (not including the column headers, so not the GridPanel's "body" element) so I could float something above it or just fill it in, etc.
Which lead me to poking around GridPanel.js and GridView.js -- whereupon I found, in GridView, some handling for an "emptyText" data member if it's defined. Excited, I played with it a bit, and found that indeed if I set an emptyText property on the GridView...
...that text gets displayed when the grid is next loaded if there are no records, and isn't displayed if there are records! Exactly what I wanted!Code:myGridPanel.getView().emptyText = 'No nifty thingies defined...';
There are no setters/getters (so for instance, if you want to change the empty text, you have to change the property and then either cause a reload or -- if you're feeling really cheeky -- call the GridView.applyEmptyText private internal might-change-at-any-moment method), and it's not documented, nor is it available via config options. So I'm wondering whether this is something that's not quite complete but is planned, or someone got half-way done and got distracted, or...?
Thanks in advance,