But see how it's wrapped? The body is not sized because there are no columns.

emptyText should not rely on the body being sized to accomodate columns. It should mean that the body is fully expanded. I'm using this to display a fatal I/O error which meant that the grid could not be produced. We couldn't even look up the columns.

So to display some error text in a GridPanel, you finally need the incantation:

Hrmm we'll take a look at what you're saying about the body being sized.

In regard to the grid and the view not refreshing immediately this is the out of the box behavior. Because you are using an ArrayStore that hasn't been loaded it doesn't know to apply the emptyText (bc the store hasn't been loaded). You can use the deferEmptyText configuration in conjunction with the unloaded store to immediately show the emptyText.

Hrmm we'll take a look at what you're saying about the body being sized.

In regard to the grid and the view not refreshing immediately this is the out of the box behavior. Because you are using an ArrayStore that hasn't been loaded it doesn't know to apply the emptyText (bc the store hasn't been loaded). You can use the deferEmptyText configuration in conjunction with the unloaded store to immediately show the emptyText.

That is a Reader issue, and it's a moot point as to whether it should handle that as you say.

To correctly indicate that zero rows were returned as the result of a successful query which happened to yield zero rows, I suggest that it is necessary to receive a success packet containing a zero length array.

I'm happy you feel that way. But That doesn't necessarily mean it isn't a bug. IMO, returning no rows is more accurate then returning an empty array. I think it is a preference of a development team's code style.

Also IMO, if something is "moot" or ambiguous, then it should be handled either way. Causes less frustration, and less confusion.

Any Solution to display messages when the grid has no records

Animal,

Was wondering if you found any better solution to display a message in the body of a Grid Panel when there are no data records to display than using the Grid View's emptyText attribute. I.e. in the case of an error or other condition that prevents the data from being retrieved.

I my case I have a 'Search Results' Grid Panel that displays a number of records from the user's search along with a tab panel where individual tabs have additional Grid Panels. Depending on which record the user has selected in the search results gird panel, there may or may not be records to display in each of the various tabbed grid panels for multiple reasons (lots of optional child tables).

I'd like to display a message in the active tab's gird panel (that would vary from record to record selected in the search results grid panel) and have been able to by setting deferEmptyText to false, changing the emptyText value, then calling refresh... but this seems like a kludge and I haven't been able to figure out how to add some padding to the grid panel to the message isn't right up against the top and left side of the grid panel.