Anyone care to tell me what I am missing? I tried everything I could find and still cannot get the empty grid to show with my no records template. I just get a small line where headers should be. Everything displays fine when data is in grid.
Thank for the response Princy, although I have to admit I don't quite understand it. I've given the grid a datasourceID that has the potential to return no records based on a data paramater. In fact, I ensure it returns no records due to a date I am throwing at it from a session variable.
I did change my code and threw it empty strings, etc. like you suggested and cannot get the empty data grid to show.
answered on 29 Oct 2008, 01:40 PM
Here is a little trick which will render the NoRecords template when there is no value passed for the SelectParameter of the data source control:
Thanks Stephen, this made a lot more sense (while at the same time making no sense at all). It appears that you are saying if the default select query does not have a valid parameter passed to it for the initial query then it returns nothing at all, instead of a no records found type response. I tested this theory by first adding the default value as you suggested, then changing my VB code to give a date far into the future and was able to get the empty grid.
No idea why that is necessary, but I assume it has to do with the way the SQL control functions. Thanks again for the response.