Walaa wrote:
Don't declaratively assign the LLBLGenProDataSource to the Grid's datasource.
Do that in code in the appropriate event.
That can be a little tricky. The thing is: during the page lifecycle (which is a mistery to many of us, including myself) the grid will be bound to its datasource and the datasource will then get a call from the grid to fetch data. If you bind the datasource after that, it might be that the things happening on the form aren't what you'd expect.
So you can also use the workaround to specify a filter which returns 0 rows (like where a field = 0 or 1=0).
This is a bit of a sad workaround, however as things are executed automatically by the asp.net framework, it's a bit cumbersome to switch things on and off at the right time, because your code might very well be executed after the call is already been made.