It's indeed a bit problematic, as due to the declarative programming, asp.net just binds the grid to the datasource at page init time (or whatever stage) and this makes the grid simply call the datasource's ExecuteSelect(), which has to produce data.
As it's unknown if the data has to be produced or not, the datasource control simply loads the data and returns it.
To overcome this, you indeed need to hide the grid until you have something to show. Another way is to set a filter which will fail, although this is a bit of a hack.