views:

1008

answers:

1

I have a GridView control on an ASP page, which I've bound to a large(ish) datasource (about 10k rows, with 24 varchar(50) columns). The page also has a seperate (i.e. not in the GridView) button control.

The problem is; clicking on the button doesn't appear to fire either the PageLoad or the Button___click events, all I get is a 'Cannot display page' error..

Interestingly, if I reduce the size of the dataset behind the GridView, everything works fine and events are fired as expected. So i'm assuming its some sort of timeout or overflow related to the amount of data on the page.

I don't particularly want to use paging if I can get away with it, so the question is, is there some sort of timeout or setting that I can change to allow handling of large grids of data?

+2  A: 

Have you tried turning off ViewState (EnableViewState=false in your Page directive) on your page? I would imagine that with a 1.2MB table, the ViewState is pretty huge and it may be overwhelming the parameter handling on the page.

tvanfosson
Thanks for the quick response :)Turning off ViewState works in that the events are fired again now, but the data in the Grid is lost. So I have to reload the DataSet from the Database and Rebind the grid. Any way around that?
StevieG
Store the data in the sesssion. You'll still need to rebind, but at least you won't have to query the database again. Having said that -- 10K rows is really too much to be usable and I would use paging.
tvanfosson