In a web page I have a table with a header row that is visually distinct from the data rows in the table 'body'. In some application states there will be no rows to populate the table and the header row all by itself looks a bit... odd. Should I:
a) show a single 'data row' that spans all columns and has a message like 'No data found'
b) hide the table and in its place display an appropriate message like 'No xxxxxx data available'
Considerations:
- If the table (or alt message) is generated server-side the whole page reloads with whichever is appropriate based on search results (page has a simple search form, submits to itself and, if the search finds anything, also has the results table below the form)
- If the search were changed later to be done via ajax I'd need to swap between the table and the 'no results' message depending on subsequent search results. You can look at it two ways
- the swap is more jarring and therefore less desirable
- OR the swap is more apparent and makes the user not have to 'read' that one row to see whether the text in a search result set that contains only one row is actual data or is the 'no results' message
I can see it both ways (and actually I guess that applies whether it's a page reload or an ajax search).