Datagrid EnableViewState problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone,
I have a datagrid to display search results. The search results at this
stage we only return the first 500 records to speed up the search. The
problem is, if I turn the EnableViewState on, the search regularly failed
with a message that says tempdb is full... It does not however happens all
the time. I have tried to turn the EnableViewState off, that seems to do the
trick but causes another problem, the datagrid's paging does not work for
hidden pages (example, we only 5 pages, numbered 1, 2,.., 5 with the rest can
be accessed by clicking the ... after the 5. After clicking the ... after the
5, the numbers 6 - 10 are displayed but if I click on any number from 7 to
10, it goes back to pages 1 - 5). HELP!!!!
Is there a size limit to contents that can be displayed on an IE6 browser?
Has anyone experienced the same problem or is it just me?
Reducing the number of records returned is an alternative but it would be
much better if someone has a work around.
Any suggestion is greatly appreciated.
Calvin
 
Diable view state for each row after populating the data:

YourDataGrid.DataSource = GetDataSource();
YourDataGrid.DataBind();

foreach (DataGridItem item in YourDataGrid.Items)
{
item.EnableViewState = false;
}

Hope this helps
 
Back
Top